/* Expat AI Assist — landing page styles */

:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.006 355);
  --surface-2: oklch(0.935 0.01 355);
  --ink: oklch(0.2 0.02 355);
  --muted: oklch(0.46 0.02 355);
  --line: oklch(0.88 0.01 355);
  --primary: oklch(0.5 0.19 355);
  --primary-deep: oklch(0.42 0.17 355);
  --primary-soft: oklch(0.94 0.04 355);
  --on-primary: oklch(1 0 0);
  --on-primary-muted: oklch(1 0 0 / 0.78);
  --accent: oklch(0.9 0.09 170);
  --accent-ink: oklch(0.3 0.07 170);
  --danger: oklch(0.55 0.19 25);

  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-voice: "Literata", Georgia, "Times New Roman", serif;

  --container: 72rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section: clamp(4rem, 8vw, 6.5rem);

  --r-input: 10px;
  --r-panel: 14px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 600ms;

  --z-sticky: 10;
  --z-toast: 20;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
}

h3 {
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

.voice {
  font-family: var(--font-voice);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.prose {
  max-width: 62ch;
}

.muted {
  color: var(--muted);
}

:focus-visible {
  outline: 3px solid var(--accent-ink);
  outline-offset: 3px;
}

.on-primary :focus-visible {
  outline-color: var(--on-primary);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Audience switching. The body carries data-audience; everything tagged
   data-for for the other audience is hidden. Elements keep their own display. */
body[data-audience="expat"] [data-for="employer"],
body[data-audience="employer"] [data-for="expat"] {
  display: none !important;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--primary);
  color: var(--on-primary);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-link {
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid oklch(1 0 0 / 0.55);
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.header-link:hover {
  background: oklch(1 0 0 / 0.12);
  border-color: oklch(1 0 0);
}

@media (max-width: 40rem) {
  .header-link {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--primary);
  color: var(--on-primary);
  padding-block: clamp(2rem, 4vw, 3.5rem) clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}

.switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: oklch(0 0 0 / 0.18);
  gap: 4px;
  max-width: 100%;
}

.switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--on-primary-muted);
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 220ms var(--ease-out), color 220ms var(--ease-out);
}

.switch button:hover {
  color: var(--on-primary);
}

.switch button[aria-pressed="true"] {
  background: var(--on-primary);
  color: var(--primary);
}

@media (max-width: 30rem) {
  .switch {
    display: flex;
  }
  .switch button {
    flex: 1;
    padding-inline: 0.75rem;
    font-size: 0.88rem;
    white-space: normal;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

@media (max-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.6vw, 4.6rem);
  max-width: 14ch;
}

.hero-lede {
  margin-top: 1.5rem;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.45;
  max-width: 34ch;
  color: var(--on-primary-muted);
}

.hero-lede strong {
  color: var(--on-primary);
  font-weight: 500;
}

.hero-cta {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 220ms var(--ease-out), background 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn-light {
  background: var(--on-primary);
  color: var(--primary);
}

.btn-light:hover {
  background: oklch(0.97 0.01 355);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-deep);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.hero-note {
  font-size: 0.95rem;
  color: var(--on-primary-muted);
}

/* The conversation card: the product, shown rather than described */

.chat {
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--r-panel);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 1px 0 oklch(0 0 0 / 0.08), 0 8px 8px -8px oklch(0 0 0 / 0.25);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.chat-head strong {
  color: var(--ink);
  display: block;
  font-size: 0.92rem;
}

.msg {
  max-width: 88%;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.msg-user {
  align-self: flex-end;
  background: var(--primary-soft);
  border-bottom-right-radius: 4px;
}

.msg-ai {
  align-self: flex-start;
  background: var(--surface);
  border-bottom-left-radius: 4px;
}

.msg-ai ol,
.msg-ai ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.msg-ai li + li {
  margin-top: 0.3rem;
}

.msg-ai .voice {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted);
}

.chat-input {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-input span {
  flex: 1;
}

.chat-input i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  display: grid;
  place-items: center;
}

.chat-input i svg {
  width: 14px;
  height: 14px;
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* Desktop: headline on the left, intro on the right, so the row uses the
   full container width instead of leaving the right half empty. */
.section-head > div {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.section-head h2 {
  max-width: 18ch;
}

.section-head p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 44ch;
  padding-bottom: 0.35em; /* sit on the headline's baseline, not its descender box */
}

@media (max-width: 56rem) {
  .section-head > div {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .section-head h2 {
    max-width: 22ch;
  }
  .section-head p {
    padding-bottom: 0;
  }
}

/* Journey timeline */

.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  position: relative;
}

.stage {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}

.stage:last-child {
  border-bottom: 1px solid var(--line);
}

.stage-when {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  padding-top: 0.2rem;
}

.stage-when small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.stage-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
}

.stage-body h3 {
  margin-bottom: 0.5rem;
}

.stage-body p {
  color: var(--muted);
}

.stage-help {
  align-self: start;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--r-panel);
  background: var(--surface);
}

.stage-help svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  padding: 4px;
}

.stage-help .voice {
  font-size: 1.02rem;
  line-height: 1.5;
}

@media (max-width: 56rem) {
  .stage {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .stage-body {
    grid-template-columns: 1fr;
  }
}

/* Reveal on scroll: visible by default; JS opts in */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Difference section */

.difference {
  background: var(--surface);
}

.difference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 56rem) {
  .difference-grid {
    grid-template-columns: 1fr;
  }
}

.points {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
}

.point h3 {
  margin-bottom: 0.4rem;
}

.point p {
  color: var(--muted);
  max-width: 48ch;
}

.difference .chat {
  position: sticky;
  top: 5.5rem;
}

/* Specifics (why Indian expats) */

.specifics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 3rem);
}

.specific {
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}

.specific dt {
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.specific dd {
  margin: 0;
  color: var(--muted);
}

/* Employer-specific block: cost of the status quo */

.today-tomorrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (max-width: 48rem) {
  .today-tomorrow {
    grid-template-columns: 1fr;
  }
}

.today-tomorrow h3 {
  margin-bottom: 1rem;
}

.today-tomorrow ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.today-tomorrow li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: var(--muted);
}

.today-tomorrow li svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
}

.today li svg {
  color: var(--muted);
}

.tomorrow li {
  color: var(--ink);
}

.tomorrow li svg {
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  padding: 3px;
}

/* ---------- Signup ---------- */

.signup {
  background: var(--primary);
  color: var(--on-primary);
  padding-block: var(--section);
}

.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

@media (max-width: 56rem) {
  .signup-grid {
    grid-template-columns: 1fr;
  }
}

.signup h2 {
  max-width: 14ch;
}

.signup-lede {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  color: var(--on-primary-muted);
  max-width: 40ch;
}

.signup-promise {
  margin-top: 2rem;
  font-size: 1.15rem;
  max-width: 34ch;
}

.form-card {
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--r-panel);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.form-card .switch {
  background: var(--surface-2);
  margin-bottom: 1.5rem;
}

.form-card .switch button {
  color: var(--muted);
}

.form-card .switch button:hover {
  color: var(--ink);
}

.form-card .switch button[aria-pressed="true"] {
  background: var(--primary);
  color: var(--on-primary);
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

@media (max-width: 34rem) {
  form {
    grid-template-columns: 1fr;
  }
}

label {
  font-weight: 700;
  font-size: 0.92rem;
}

label .opt {
  font-weight: 500;
  color: var(--muted);
}

input,
select {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  padding: 0.75rem 0.9rem;
  width: 100%;
  min-height: 3rem;
  transition: border-color 160ms var(--ease-out);
}

input::placeholder {
  color: oklch(0.52 0.02 355);
}

input:hover,
select:hover {
  border-color: oklch(0.7 0.02 355);
}

input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  font-size: 0.85rem;
  color: var(--danger);
  min-height: 0;
}

.field-error:empty {
  display: none;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23554' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
}

.form-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

.form-footer .btn {
  min-width: 12rem;
}

.form-footer .btn[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.form-privacy {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 30ch;
}

.form-status {
  grid-column: 1 / -1;
  font-size: 0.95rem;
  color: var(--danger);
}

.form-status:empty {
  display: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Success state */

.success {
  display: none;
  text-align: left;
}

.form-card.is-done form,
.form-card.is-done .switch {
  display: none;
}

.form-card.is-done .success {
  display: block;
  animation: rise var(--dur) var(--ease-out) both;
}

.success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
}

.success-mark svg {
  width: 28px;
  height: 28px;
}

.success h3 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 0.75rem;
}

.success p {
  color: var(--muted);
  max-width: 44ch;
}

.success .voice {
  display: block;
  margin-top: 1.25rem;
  color: var(--ink);
  font-size: 1.1rem;
}

.success .again {
  margin-top: 1.5rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

/* ---------- Motion ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.js .hero .rise {
  animation: rise 800ms var(--ease-out) both;
}

.js .hero .rise:nth-child(2) {
  animation-delay: 80ms;
}
.js .hero .rise:nth-child(3) {
  animation-delay: 160ms;
}
.js .hero .rise:nth-child(4) {
  animation-delay: 240ms;
}

.js .hero .chat {
  animation: rise 800ms var(--ease-out) 200ms both;
}

.js .hero .msg,
.js .hero .chat-input {
  animation: rise 600ms var(--ease-out) both;
}

.js .hero .msg:nth-of-type(1) {
  animation-delay: 500ms;
}
.js .hero .msg:nth-of-type(2) {
  animation-delay: 1000ms;
}
.js .hero .chat-input {
  animation-delay: 1250ms;
}

/* Tab switch crossfade */
.js .swap {
  animation: swap 360ms var(--ease-out) both;
}

@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
