/*
 * The marketing site: the landing page, the articles and the privacy page, signing
 * in, and the pages around the waiting list. It's laid out in the app's look
 * (docs/cartoma-mockups.html): a cream ground, one terracotta accent, Lora for
 * headings and Work Sans for everything else, rounded fields and pill buttons.
 * Each layout loads one stylesheet and never the other, so the palette below
 * repeats app.css's rather than sharing it. Keep the two in step.
 *

 */

:root{
  --bg:#f3efe6;
  --card:#fffdfa;
  --ink:#2f3a47;
  --ink-soft:#6b7480;
  --accent:#b8683a;
  --accent-deep:#9c5530;
  --accent-soft:#f1ddc8;
  --navy:#3d4a5c;
  --line:rgba(47,58,71,.14);
  --danger:#9a4a34;
  --serif:"Lora",Georgia,serif;
  --sans:"Work Sans",system-ui,sans-serif;
  --measure:36rem;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
/* The mock-ups draw their phone screens on the card colour and their desktop ones
   on the cream, and the site follows the app in both. */
body{
  margin:0;
  background:var(--card);color:var(--ink);
  font:400 1.0625rem/1.65 var(--sans);
}
@media(min-width:720px){body{background:var(--bg)}}
h1,h2,h3{font-family:var(--serif);font-weight:600;color:var(--ink)}
a{color:inherit;text-underline-offset:3px;text-decoration-thickness:1px}
a:focus-visible,button:focus-visible,input:focus-visible{
  outline:3px solid var(--accent);outline-offset:2px;
}

.wrap{max-width:66rem;margin:0 auto;padding:0 1.5rem}

/* ---------- header ---------- */
/* A bar the width of the window, as in the app. */
.site-head{background:var(--card);border-bottom:1px solid var(--line)}
.site-head-inner{
  display:flex;justify-content:space-between;align-items:center;gap:.5rem 1rem;
  padding-top:14px;padding-bottom:14px;
}
.mast{font:600 19px/1 var(--serif);letter-spacing:-.01em;text-decoration:none}
.mast em{font-style:normal;color:var(--accent)}
.site-head .sub{font-size:13px;color:var(--ink-soft)}
.site-head .head-right{
  display:flex;align-items:baseline;gap:.4rem 1.1rem;
  flex-wrap:wrap;justify-content:flex-end;
}
.account-nav{display:flex;align-items:baseline;gap:.9rem;font:500 13px/1.2 var(--sans)}
.account-nav a{color:var(--ink-soft)}
.account-nav a:hover{color:var(--ink)}
.account-nav form{margin:0}
.linkish{
  border:0;background:none;padding:0;cursor:pointer;
  font:inherit;color:var(--ink-soft);
  text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;
}
.linkish:hover{color:var(--ink)}
@media(max-width:560px){
  .site-head-inner{flex-direction:column;align-items:flex-start}
  .site-head .head-right{justify-content:flex-start}
}

.flash{
  position:relative;max-width:560px;margin:16px 0 0;padding:14px 16px 14px 34px;
  border-radius:14px;background:var(--accent-soft);
  font:600 13px/1.45 var(--sans);color:var(--navy);
}
.flash::before{
  content:"";position:absolute;left:16px;top:19px;
  width:8px;height:8px;border-radius:50%;background:var(--accent);
}
.flash-alert::before{background:var(--danger)}
@media(min-width:720px){.flash{margin:24px auto 0}}

/* ---------- type ---------- */
h1{
  font-size:clamp(2.1rem,5.2vw,3.4rem);
  line-height:1.12;letter-spacing:-.015em;
  margin:0 0 1rem;max-width:16ch;
}
h2{font-size:clamp(1.4rem,2.6vw,1.75rem);line-height:1.25;letter-spacing:-.01em;margin:0 0 .85rem}
h3{font-size:1.15rem;line-height:1.3;margin:0 0 .35rem}
p{margin:0 0 1.15rem;max-width:var(--measure)}
.lede{font-size:1.15rem;line-height:1.6;color:var(--ink-soft);max-width:36rem}

/* ---------- hero ---------- */
.hero{
  display:grid;grid-template-columns:1.05fr .95fr;gap:3.5rem;align-items:center;
  padding:3.5rem 0 4rem;
}
@media(max-width:860px){.hero{grid-template-columns:1fr;gap:2.5rem;padding:2.5rem 0 3rem}}

/* The booklet is a printed thing, so it keeps paper's square corners and a shadow
   where the app's cards are rounded. */
.booklet-stage{position:relative;padding:1rem}
.booklet{
  position:relative;
  background:#fff;
  padding:1.4rem 1.4rem 1.7rem;
  box-shadow:
    0 0 0 1px var(--line),
    0 24px 44px -20px rgba(47,58,71,.4);
  transform:rotate(-1.4deg);
}
.booklet::before{
  content:"";position:absolute;left:-3px;top:22%;
  width:6px;height:34px;background:#a3a7ab;
  box-shadow:0 74px 0 #a3a7ab;
  border-radius:1px;
}
.booklet-title{font:600 1.5rem/1.1 var(--serif);margin:0 0 .2rem}
.booklet-date{font-size:.85rem;color:var(--ink-soft);margin:0 0 .9rem}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:.55rem}
.snap{
  aspect-ratio:4/3;border:5px solid #fff;
  box-shadow:0 1px 4px rgba(47,58,71,.18);
}
.snap.tall{aspect-ratio:3/4;grid-row:span 2}
.s1{background:linear-gradient(150deg,#8FA68C,#C6C29B 60%,#E3D9C0)}
.s2{background:linear-gradient(200deg,#7E93B8,#B9C2CE 70%,#DDD8CC)}
.s3{background:linear-gradient(120deg,#C79A78,#DFC3A4 65%,#EFE3D2)}
.s4{background:linear-gradient(165deg,#6F8296,#A7B0B4 60%,#D9D3C6)}
.cap{
  font-size:.78rem;color:var(--ink-soft);
  margin:.45rem 0 0;line-height:1.35;
}
.postmark{
  position:absolute;right:-1.1rem;top:-1.1rem;
  width:104px;height:104px;border-radius:50%;
  border:2px solid var(--accent);color:var(--accent);
  display:grid;place-content:center;text-align:center;
  font:600 .62rem/1.45 var(--sans);letter-spacing:.06em;
  transform:rotate(11deg);opacity:.85;
  background:rgba(255,253,250,.35);
}
.postmark b{display:block;font-size:.8rem;letter-spacing:.02em}

/* ---------- the waiting-list form ---------- */
.signup{margin:1.6rem 0 0;max-width:30rem}
.signup label{display:block;font:600 12px/1.2 var(--sans);margin:0 0 8px}
.signup .row{display:flex;gap:.5rem}
@media(max-width:480px){.signup .row{flex-direction:column}}
/* 16px, as in the app: iOS zooms the whole page in on a field set any smaller. */
input[type=email],input[type=password]{
  flex:1;min-width:0;margin:0;
  font:400 16px/1.3 var(--sans);color:var(--ink);
  padding:12px 14px;border:1.5px solid var(--line);border-radius:12px;background:#fff;
}
input::placeholder{color:#8d949d}
input:focus{border-color:var(--accent)}
input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:13px 26px;border:1.5px solid var(--accent);border-radius:100px;
  background:var(--accent);color:#fff;
  font:600 15px/1.2 var(--sans);text-decoration:none;white-space:nowrap;
  cursor:pointer;-webkit-appearance:none;appearance:none;
}
.btn:hover{background:var(--accent-deep);border-color:var(--accent-deep)}
.consent{font-size:12px;line-height:1.45;color:var(--ink-soft);margin:.6rem 0 0;max-width:32rem}
.form-error{font:600 13px/1.4 var(--sans);color:var(--danger);margin:0 0 .6rem}

/* honeypot: hidden from real users, still reachable by simple bots */
.hp-field{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}

/* ---------- sections ---------- */
section{padding:3.2rem 0;border-top:1px solid var(--line)}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:1.25rem;margin-top:1.8rem}
@media(max-width:760px){.steps{grid-template-columns:1fr;gap:1rem}}
/* Each step a card, like a post in the feed, under a label like the sign-up steps'. */
.step{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px 22px 22px}
.step-n{
  display:block;margin:0 0 10px;
  font:700 11px/1 var(--sans);letter-spacing:.1em;text-transform:uppercase;
  color:var(--accent);
}
.step p{margin:0;font-size:.95rem;color:var(--ink-soft);max-width:26rem}

/* Set apart from the page it closes: cream on a phone, where the page is the card
   colour, and the other way round on a desktop. */
.closer{background:var(--bg);border-top:1px solid var(--line)}
@media(min-width:720px){.closer{background:var(--card)}}
.closer .wrap{padding-top:3.2rem;padding-bottom:3.4rem}

footer{padding:2rem 0 3rem;font-size:13px;color:var(--ink-soft)}
footer nav{display:flex;gap:1.2rem;flex-wrap:wrap;margin-bottom:.8rem}

/* ---------- SEO article ---------- */
.article{padding:2.6rem 0 0;max-width:var(--measure)}
.article h1{font-size:clamp(1.9rem,4.4vw,2.6rem);max-width:20ch}
.meta{font-size:13px;color:var(--ink-soft);margin:0 0 1.6rem}
.article h2{margin-top:2.4rem}
.article ul{padding-left:1.1rem;max-width:var(--measure)}
.article li{margin-bottom:.5rem}
/* The one mention of the product mid-article, in the soft accent the app keeps for
   the one note on a page that matters. */
.inline-note{
  margin:1.8rem 0;padding:16px 18px;border-radius:14px;
  background:var(--accent-soft);color:var(--navy);font-size:.95rem;
}
.inline-note a{color:var(--ink)}
.endcap{
  margin:2.8rem 0 0;padding:26px 26px 28px;
  background:#fff;border:1px solid var(--line);border-radius:20px;
}
.endcap h2{margin-top:0;font-size:1.3rem}
.related{margin-top:2.6rem;padding-top:1.4rem;border-top:1px solid var(--line)}
.related h2{font-size:1.05rem;margin-bottom:.7rem}
.related ul{list-style:none;padding:0;margin:0}
.related li{margin-bottom:.45rem}

/* ---------- privacy / plain content pages ---------- */
.content-page{padding:2.6rem 0 4rem;max-width:var(--measure)}

/* ---------- sign in, password resets and the waiting-list pages ---------- */
/* The card the sign-up steps use: the whole screen on a phone, a card on the cream
   on a desktop. */
.card-page{padding:28px 28px 40px}
.card-page h1{font-size:26px;line-height:1.25;letter-spacing:0;max-width:none;margin:0 0 10px}
.card-page > p:not([class]){font-size:14.5px;line-height:1.55;color:var(--ink-soft)}
.card-page > p:not([class]) a{color:var(--ink)}
@media(min-width:720px){
  .card-page{
    width:calc(100% - 48px);max-width:460px;margin:56px auto;padding:44px 44px 40px;
    background:var(--card);border-radius:20px;box-shadow:0 0 0 1px var(--line);
  }
  .card-page h1{font-size:28px}
}

.auth-form{display:flex;flex-direction:column;margin:24px 0 0}
.auth-form .field{display:flex;flex-direction:column;gap:8px;margin:0 0 18px}
.auth-form label{font:600 12px/1.2 var(--sans);color:var(--ink)}
.auth-form input[type=email],.auth-form input[type=password]{width:100%}
.auth-form .hint{font-size:12px;line-height:1.45;color:var(--ink-soft);margin:0}
.auth-form .field-inline{display:flex;align-items:center;gap:10px;margin:0 0 22px}
.auth-form .field-inline label{font:400 13.5px/1.3 var(--sans);color:var(--ink-soft)}
.auth-form .btn{width:100%;margin-top:6px}
/* Rails wraps a field that failed validation, and its label, in a div of their
   own. Dropping it out of the layout keeps both in the field's column. */
.field_with_errors{display:contents}
.field_with_errors label{color:var(--danger)}
.auth-form .field_with_errors input{border-color:var(--danger)}
.auth-alt{font-size:13px;margin:18px 0 0}
.auth-alt a{color:var(--ink)}
/* A block of its own inside the sign-in card, for the waiting list. */
.auth-alt-block{margin:28px 0 0;padding:20px 20px 22px;background:var(--bg);border-radius:14px}
.auth-alt-block h2{font-size:18px;line-height:1.3;margin:0 0 8px}
.auth-alt-block p:not([class]){font-size:13.5px;line-height:1.55;color:var(--ink-soft)}
.auth-alt-block .signup{margin-top:16px}

#error_explanation{margin:20px 0 0;padding:14px 16px;border-radius:14px;background:#f8e4dc}
#error_explanation h2{font:700 13px/1.3 var(--sans);color:var(--danger);margin:0 0 4px}
#error_explanation ul{margin:0;padding-left:1.1rem;font-size:13px;line-height:1.5}

@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
