/* The public face of orlo.today. Shares the app's palette and its
   serif-headline/sans-body pairing so signing in doesn't feel like arriving
   at a different product, but keeps its own stylesheet — a marketing page and
   an application UI want different rhythm, and the app shouldn't carry weight
   only this page uses. */

:root {
  --ink: #1a1a1a;
  --sub: #6b7280;
  --border: #e5e7eb;
  --bg: #fafafa;
  --panel: #ffffff;
  --warm: #c2410c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.hero {
  position: relative;
  min-height: min(760px, 88vh);
  display: flex;
  flex-direction: column;
  /* The image carries the colour; the flat fill underneath it means the
     headline is still readable in the instant before it loads, and if it
     never loads at all. */
  background-color: #14100e;
  background-image: url("/hero-bg.svg");
  background-size: cover;
  background-position: center;
  color: #fff7ed;
}

.site-nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  padding: 0 24px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 9px;
}
.brand:hover { background: rgba(255, 247, 237, 0.1); }
.brand:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.brand-mark { display: block; transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1); }
.brand:hover .brand-mark { transform: rotate(90deg); }

.nav-cta {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(255, 247, 237, 0.32);
  border-radius: 999px;
}
.nav-cta:hover { border-color: rgba(255, 247, 237, 0.7); background: rgba(255, 247, 237, 0.07); }

.hero-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 88px;
  /* A flex item defaults to min-width:auto, i.e. it refuses to shrink below
     its own min-content. The sign-in card's max-width:430px sets that floor
     at 430, so on a 390px phone this box grew to 429 and pushed the page
     sideways — measured, not guessed. Letting it shrink lets the card's
     width:100% resolve against the screen instead. */
  min-width: 0;
}

.eyebrow {
  margin: 0 0 26px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 247, 237, 0.62);
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  /* One headline line now ("I'm Orlo - Your AI Meal Planner 🍕"); it wraps on
     its own at narrow widths, balanced by the mobile rule below. */
  font-size: clamp(32px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}

.lede {
  font-size: clamp(17px, 2.3vw, 22px);
  color: rgba(255, 247, 237, 0.82);
  margin: 0 0 40px;
  /* Three lines of prose now rather than one short line, so this is a
     measure-of-line cap rather than a "keep it on one line" cap. */
  max-width: 620px;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.button {
  display: inline-block;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.hero .button.primary { background: #fff7ed; color: #14100e; }
.hero .button.primary:hover { background: #fff; }
.button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.cta-note { font-size: 14px; color: rgba(255, 247, 237, 0.6); }

/* --- Sign in ---------------------------------------------------------- */

/* The sign-in page reuses the hero wholesale — same backdrop, same nav, same
   brand — so the step from landing page to login isn't a step out of the
   product. Only the panel in the middle is new. */

.auth-hero { min-height: 100vh; }
.auth-inner { padding: 24px 24px 72px; }

.auth-card {
  width: 100%;
  max-width: 430px;
  /* The hero centres its children; the form's own contents read left. */
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  border-radius: 18px;
  padding: 34px 32px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.auth-card h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 29px;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.auth-sub { color: var(--sub); font-size: 15px; margin: 0 0 22px; }

.auth-card form { display: flex; gap: 8px; margin: 0 0 12px; }

/* Country code and number are one field with a divider, not two controls —
   they're one piece of information. The select is sized to its flag+code
   only; the full country name lives in the dropdown, which would otherwise
   make the closed control absurdly wide. */
.phone-group {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.phone-group:focus-within { outline: 2px solid var(--ink); outline-offset: 1px; }
/* The select is transparent and laid over the display span rather than
   styled directly: a native closed select always renders its selected
   option's full text, which truncated mid-word ("+971 U") at every width
   narrow enough to leave room for the number. Hiding it keeps the native
   dropdown — full country names, keyboard type-ahead, the OS picker on a
   phone — while the closed control shows just the flag and code. */
.country-field {
  position: relative;
  display: block;
  width: 86px;
  flex: none;
  border-right: 1px solid var(--border);
}
.country-field select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 15px; /* iOS zooms the page if a focused control is under 16px */
}
.country-display {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 12px 8px 12px 12px;
  font-size: 15px;
  white-space: nowrap;
  pointer-events: none; /* clicks belong to the select underneath */
}
.country-display::after {
  content: "";
  margin-left: auto;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--sub);
}
.country-field:focus-within { outline: none; }
/* One market: no caret, no pointer, no focus ring — the field is a label for
   which country the number is read as, not a control. */
.country-field.is-static .country-display::after { content: none; }
.country-field.is-static select { cursor: default; pointer-events: none; }
.country-field.is-static .country-display { padding-right: 12px; }
.country-field.is-static { width: auto; }
/* Scoped through .auth-card to outrank the generic `.auth-card input` rule
   below, which would otherwise re-apply a border and radius inside the group
   and draw a second box around the number field. */
.auth-card .phone-group input {
  border: none;
  border-radius: 0;
}
.auth-card .phone-group input:focus-visible { outline: none; }
.auth-card input {
  flex: 1;
  min-width: 0; /* a flex item's default min-width:auto overflows the card */
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.auth-card input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Six boxes, one digit each. Stacked over the button rather than beside it:
   the row of boxes needs the full width, and "Verify" is rarely pressed
   anyway since six digits submit on their own. */
.auth-card .code-form {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  /* The phone row wraps on narrow screens (see the media query), and that
     rule matches every form in the card. In a COLUMN container, wrapping
     lays items out in extra columns and grows the box sideways — this one
     measured 1432px inside a 390px screen. It is already stacked; it must
     never wrap. */
  flex-wrap: nowrap;
}
.code-boxes {
  display: flex;
  gap: 8px;
  /* Same flex trap as .hero-inner: min-width defaults to auto, so this row
     refused to shrink below the six inputs' intrinsic width and measured
     1432px inside a 390px screen. */
  min-width: 0;
}
.auth-card .code-box {
  /* Flexible rather than fixed: six 48px boxes plus gaps don't fit the card
     on a 390px phone. */
  flex: 1 1 0;
  min-width: 0;
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.auth-card .code-box:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0;
  border-color: transparent;
}
.auth-card .code-form button[type="submit"] { width: 100%; }

.resend-row { font-size: 14px; color: var(--sub); margin: 14px 0 0; line-height: 1.7; }
.resend-row .link-button { margin-top: 0; }
.resend-row .link-button:disabled {
  color: var(--sub);
  text-decoration: none;
  cursor: default;
  opacity: 0.7;
}
.auth-card button[type="submit"] {
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.auth-card button[type="submit"]:hover { background: #000; }
.auth-card button[type="submit"]:disabled { opacity: 0.5; cursor: default; }

/* Invite code, revealed only for numbers with no account yet. Outside the
   phone <form> (a flex row, which would put the label beside the field), so
   it stacks on its own. */
#invite-row { margin: -2px 0 12px; }
.invite-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
#invite-row input {
  width: 100%;
  /* Codes are generated without O/0 or I/1/L and matched case-insensitively,
     so displaying whatever is typed as uppercase is safe — it reads back as
     the code on the invite. */
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hint { font-size: 13px; color: var(--sub); margin: 8px 0 0; }
.error { color: #b91c1c; font-size: 14px; margin: 6px 0 0; }

.link-button {
  display: inline-block;
  margin-top: 16px;
  padding: 0;
  background: none;
  border: none;
  color: var(--sub);
  font-size: 14px;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: var(--ink); }

/* --- Body ------------------------------------------------------------- */

/* Classed, not a bare `main` element selector. The sign-in page's own <main>
   was picking this up — and its `margin: 0 auto` suppressed the flex stretch
   that keeps that box the width of the screen, so it sized itself to the
   card's 430px max-width and pushed a 390px phone sideways. */
.page-body { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 72px 0 12px;
}
.flow-item svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--warm);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  margin-bottom: 16px;
}
.flow-item h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 600; }
.flow-item p { margin: 0; font-size: 15px; color: var(--sub); }

.points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 56px;
  padding: 78px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 72px;
}
.point h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.012em;
  margin: 0 0 10px;
}
.point p { margin: 0; color: #3f3f46; font-size: 15.5px; }

.closing {
  margin: 84px 0 96px;
  padding: 56px 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: center;
}
.closing h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(24px, 3.6vw, 32px);
  margin: 0 0 12px;
}
.closing p { margin: 0 auto 30px; max-width: 520px; color: var(--sub); }
.closing .button.primary { background: var(--ink); color: #fff; }
.closing .button.primary:hover { background: #000; }

.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 48px;
  color: var(--sub);
  font-size: 13.5px;
}
.site-footer .dot { margin: 0 8px; }
.site-footer a { color: inherit; }

@media (max-width: 760px) {
  .hero { min-height: 82vh; }
  /* The landing hero deliberately stops short of the fold so the content
     below it is discoverable. Sign-in has nothing below it, so the same rule
     would just leave a pale strip under the card. */
  .auth-hero { min-height: 100vh; }
  .hero-inner { padding: 24px 24px 36px; }
  /* Let the headline wrap naturally and balance its lines on narrow screens. */
  .hero h1 { text-wrap: balance; }

  /* Country picker, number and button on one row leave about 190px for the
     number on a 390px screen — measured as "555 12" visible, which is not a
     usable phone field. Give the number the full width and put the button
     under it. */
  .auth-card form { flex-wrap: wrap; }
  .auth-card .phone-group { flex: 1 1 100%; }
  .auth-card button[type="submit"] { width: 100%; }
  .flow { grid-template-columns: 1fr; gap: 34px; padding-top: 56px; }
  .points { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; margin-top: 56px; }
  .closing { padding: 40px 22px; margin: 60px 0 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark { transition: none; }
  .brand:hover .brand-mark { transform: none; }
}

/* Invite codes on the sign-in page */
.invite-line .link-button { background: none; border: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.invite-field { margin-top: 10px; }
.invite-field input { width: 100%; box-sizing: border-box; letter-spacing: 0.04em; }
.invite-head { font-size: 16px; margin: 22px 0 8px; }
