/* Public website — landing, legal and error pages. Logical properties throughout (RTL + LTR). */

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 50;
  background: var(--ink-900); color: var(--kernel-200); padding: 8px 14px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 50px; width: auto; }
html[lang="en"] .brand img { height: 34px; }
.brand-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .brand-light { display: none !important; }
  .brand-dark { display: block !important; }
}
.main-nav { display: none; gap: 4px; margin-inline-start: 8px; }
.main-nav a {
  color: var(--text-soft); text-decoration: none; font-weight: 500; padding: 6px 12px; border-radius: 999px;
}
.main-nav a:hover { color: var(--text); background: var(--bg-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px;
  border-radius: 999px; color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.lang-switch:hover { background: var(--bg-soft); color: var(--text); }
.lang-long { display: none; }
.header-cta span { display: none; }
@media (min-width: 560px) {
  .header-cta span { display: inline; }
}
@media (min-width: 860px) {
  .main-nav { display: flex; }
  .lang-long { display: inline; }
  .lang-short { display: none; }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(36px, 7vw, 88px) clamp(48px, 8vw, 104px); }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.08fr 0.92fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--kernel-700); font-weight: 600; font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--kernel-300); } }
.hero-title {
  margin-block: 20px 18px; font-weight: 800; font-size: clamp(2.6rem, 7.4vw, 4.6rem); line-height: 1.18;
  display: flex; flex-direction: column;
}
html[lang="en"] .hero-title { font-size: clamp(2.4rem, 6.4vw, 4.1rem); line-height: 1.08; }
.swash {
  align-self: flex-start;
  background: linear-gradient(transparent 58%, var(--kernel-200) 58%, var(--kernel-200) 90%, transparent 90%);
  padding-inline: 0.12em; border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  .swash { background: linear-gradient(transparent 58%, rgba(147, 197, 83, 0.38) 58%, rgba(147, 197, 83, 0.38) 90%, transparent 90%); }
}
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 28px 16px; }
.hero-note { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.95rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.hero-badges li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-soft); font-size: 0.9rem; font-weight: 500;
}
.hero-badges .icon { color: var(--kernel-600); }

/* phone mock-up (pure CSS) */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 460px; }
.blob {
  position: absolute; width: min(520px, 110%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--kernel-100), color-mix(in srgb, var(--kernel-300) 55%, transparent) 45%, transparent 70%);
  filter: blur(6px); opacity: 0.9;
}
@media (prefers-color-scheme: dark) { .blob { opacity: 0.32; } }
.float-mark {
  /* sits on the phone's empty top corner (the side opposite the title) */
  position: absolute; width: 104px; height: auto; inset-inline-end: max(0px, calc(50% - 205px)); top: 0; z-index: 3;
  filter: drop-shadow(0 18px 24px rgba(48, 66, 34, 0.3));
  animation: bob 5s ease-in-out infinite;
}
@media (min-width: 600px) { .float-mark { width: 132px; inset-inline-end: max(0px, calc(50% - 250px)); top: 4%; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
.phone {
  position: relative; z-index: 2; width: 268px; height: 540px; padding: 12px;
  border-radius: 44px; background: #141C16; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2C3A2F;
  transform: rotate(3deg);
}
[dir="rtl"] .phone { transform: rotate(-3deg); }
.phone-notch { position: absolute; top: 20px; inset-inline-start: 50%; translate: -50% 0; width: 84px; height: 22px; border-radius: 20px; background: #141C16; z-index: 2; }
[dir="rtl"] .phone-notch { translate: 50% 0; }
.phone-screen {
  height: 100%; border-radius: 34px; overflow: hidden; background: #FDFBF6; color: #18221A;
  padding: 46px 14px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; line-height: 1.55;
}
.mock-top { display: flex; flex-direction: column; gap: 2px; }
.mock-course { font-size: 11px; color: #46701D; font-weight: 600; }
.mock-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.3; }
.mock-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #EFE9DA; font-weight: 600; font-size: 11px; }
.chip .icon { width: 13px; height: 13px; }
.chip-kernel { background: #93C553; }
.mock-map { position: relative; height: 92px; border-radius: 14px; background: #E4F0CF; }
.mock-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mock-map path { stroke: #5C8F27; stroke-width: 2; fill: none; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.node { position: absolute; width: 22px; height: 14px; border-radius: 6px; background: #fff; border: 2px solid #77AD38; translate: -50% -50%; z-index: 1; }
.node-main { left: 50%; top: 50%; width: 46px; height: 22px; background: #18221A; border-color: #18221A; }
.n1 { left: 15%; top: 18%; } .n2 { left: 85%; top: 18%; } .n3 { left: 16%; top: 84%; } .n4 { left: 84%; top: 84%; }
.mock-card { background: #fff; border: 1px solid #E6DFCF; border-radius: 14px; padding: 10px 12px; box-shadow: 0 6px 14px -10px rgba(48, 66, 34, 0.5); }
.mock-card strong { font-size: 13px; }
.mock-card p { color: #4A5446; }
.mock-quiz { background: #18221A; color: #EEF0E4; border-radius: 14px; padding: 10px 12px; }
.mock-answer { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: #2F7A55; color: #fff; font-weight: 600; font-size: 11px; }
.mock-progress { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.mock-progress span { flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(to left, #EFE9DA 40%, #93C553 40%); }
[dir="ltr"] .mock-progress span { background: linear-gradient(to right, #93C553 60%, #EFE9DA 60%); }
.mock-progress em { font-style: normal; font-size: 11px; font-weight: 600; color: #46701D; }

/* ------------------------------------------------------------------ cracked shell edge */
.crack {
  position: absolute; inset-inline: 0; top: calc(100% - 1px); height: 16px; z-index: 2; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='16' viewBox='0 0 240 16'%3E%3Cpath fill='%2393C553' d='M0 0H240V7L226 12L212 5L197 13L184 6L168 14L153 6L139 11L124 4L108 13L94 6L79 12L64 5L49 14L35 7L20 12L8 5L0 8Z'/%3E%3C/svg%3E") repeat-x;
  background-size: 240px 16px;
}

/* ------------------------------------------------------------------ the name: a dictionary entry */
.pun { position: relative; background: var(--kernel-400); color: var(--ink-900); padding-block: clamp(48px, 7vw, 76px) clamp(44px, 6vw, 64px); }
.pun-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .pun-inner { grid-template-columns: minmax(300px, 400px) 1fr; gap: 64px; } }
.pun-entry {
  justify-self: center; width: min(100%, 400px); margin: 0; padding: 22px 26px 24px; border-radius: var(--radius-lg);
  background: #FAF7F0; color: #18221A; box-shadow: 0 24px 40px -22px rgba(24, 34, 26, 0.55); rotate: -2deg;
}
[dir="ltr"] .pun-entry { rotate: 2deg; }
.pun-head { display: flex; align-items: flex-end; gap: 16px; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 2px dashed #D3C7AC; }
.pun-head img { height: 104px; width: auto; }
.pun-kind { font-size: 0.95rem; font-weight: 600; color: #4A5446; padding-bottom: 14px; }
.pun-senses { margin: 0; padding-inline-start: 1.3em; display: grid; gap: 8px; font-size: 1.04rem; line-height: 1.7; }
.pun-senses li::marker { font-family: var(--font-display); font-weight: 800; color: #5C8F27; }
.pun-copy h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: 10px; }
.pun-copy p { font-size: 1.08rem; max-width: 40em; }

/* ------------------------------------------------------------------ sections */
.section { padding-block: clamp(72px, 10vw, 120px) clamp(56px, 8vw, 96px); position: relative; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { margin-top: 10px; color: var(--text-soft); font-size: 1.08rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: none; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 24px 24px; box-shadow: var(--shadow-sm);
}
.step-num {
  position: absolute; top: 18px; inset-inline-end: 20px; font-family: var(--font-display); font-weight: 800;
  font-size: 2.6rem; line-height: 1; color: var(--kernel-300);
}
.step-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  background: var(--kernel-400); color: var(--ink-900);
}
.step-icon .icon { width: 26px; height: 26px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-soft); }

.style-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .style-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .style-grid { grid-template-columns: repeat(4, 1fr); } }
.style-card {
  background: var(--surface); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.style-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.style-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin-bottom: 14px;
  background: var(--bg-soft); color: var(--kernel-600); border: 2px solid var(--kernel-300);
}
.style-card h3 { margin-bottom: 6px; font-size: 1.12rem; }
.style-card p { color: var(--text-soft); font-size: 0.98rem; }

/* dark "yours alone" section */
.yours { background: var(--invert-bg); color: var(--invert-text); overflow: hidden; }
.yours::before {
  content: ""; position: absolute; width: 420px; height: 420px; inset-inline-end: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 197, 83, 0.2), transparent 65%);
}
.yours-grid { position: relative; display: grid; gap: 36px; }
@media (min-width: 900px) { .yours-grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; gap: 64px; } }
.yours h2 { color: var(--kernel-300); }
.yours-lead { margin-top: 14px; font-size: 1.15rem; color: #C9D0BE; }
.yours-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.yours-list li {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius-lg);
  background: rgba(238, 240, 228, 0.05); border: 1px solid rgba(147, 197, 83, 0.18);
}
.yours-list .icon { width: 28px; height: 28px; color: var(--kernel-400); margin-top: 2px; }
.yours-list h3 { color: #F4F6EC; margin-bottom: 4px; font-size: 1.1rem; }
.yours-list p { color: #B9C2AE; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none;
  padding: 18px 20px; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-chevron { transition: transform 0.2s var(--ease); color: var(--text-muted); }
.faq details[open] .faq-chevron { transform: rotate(180deg); }
.faq details p { padding: 0 20px 20px; color: var(--text-soft); }
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

/* closing call to action */
.cta-band { position: relative; background: var(--kernel-400); color: var(--ink-900); padding-block: 64px 72px; text-align: center; }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta-mark { width: 116px; height: auto; margin-top: -122px; filter: drop-shadow(0 16px 20px rgba(48, 66, 34, 0.3)); rotate: 8deg; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3rem); }
.cta-band p { font-size: 1.1rem; max-width: 34em; margin-bottom: 14px; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--invert-bg); color: #B9C2AE; padding-block: 72px 32px; }
.footer-inner { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1fr auto; align-items: center; } }
.footer-brand img { height: 58px; width: auto; margin-bottom: 10px; }
html[lang="en"] .footer-brand img { height: 40px; }
.footer-brand p { font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { color: #EEF0E4; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.footer-nav a:hover { color: var(--kernel-300); }
.footer-rights { grid-column: 1 / -1; border-top: 1px solid rgba(238, 240, 228, 0.1); padding-top: 18px; font-size: 0.88rem; color: #8F9886; }

/* ------------------------------------------------------------------ legal & error pages */
.page-narrow { max-width: 780px; padding-block: 56px 88px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin-bottom: 6px; }
.prose .updated { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 32px; }
.prose h2 { font-size: 1.35rem; margin-block: 34px 10px; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-block: 6px; }
.prose .callout { background: var(--warning-soft); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 16px 18px; color: var(--text); margin-block: 18px; }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 60px; }
.error-page img { width: 150px; margin: 0 auto 18px; }
.error-page h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; margin-bottom: 8px; }
.error-page p { color: var(--text-soft); margin-bottom: 24px; }
