/* comotoca.com — the brand guide applied. Cream page, forest text, moss
   links, clay for exactly one accent per view. No dark mode by design. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --forest: #1F3D2B;
  --clay:   #C8744A;
  --cream:  #F4F1EA;
  --moss:   #3C6B4A;
  --sand:   #E6DFD0;
  --ink:    #1A1A18;

  --text: 720px;
  --wide: 960px;
  --gutter: 24px;
  --section: 96px;
}

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

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--forest);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
h2 { font-size: 28px; margin-bottom: 24px; }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--forest); }
a:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; border-radius: 2px; }

img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--text); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--wide { max-width: var(--wide); }

/* Header */

.site-header {
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 1;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand { display: block; line-height: 0; }
.brand-lockup { width: 157px; height: 40px; }
.brand-symbol { display: none; width: 42px; height: 32px; }

.site-nav { display: flex; gap: 32px; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.menu { display: none; }

/* Sections */

main > section { padding: var(--section) 0 0; }
main > section:last-of-type { padding-bottom: var(--section); }

.hero { text-align: center; }
.hero-symbol { width: 240px; height: 184px; margin: 0 auto 40px; }
.hero .wrap { max-width: var(--wide); }
.hero h1 {
  font-size: 44px;
  line-height: 52px;
}
/* The one clay accent on the page: a single rule under the headline. */
.hero h1::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 20px auto 0;
  background: var(--clay);
}
.hero p {
  max-width: 560px;
  margin: 28px auto 0;
  font-size: 20px;
}

/* The one animation on the site: the shell's spiral grows out from its
   centre and the tick at its end draws last. 1.2 s total, ease-out,
   once, and not at all for people who asked for less motion. */
.hero-symbol .spiral {
  clip-path: circle(0% at 50% 50%);
  animation: spiral 0.9s ease-out forwards;
}
.hero-symbol .tick {
  stroke-dasharray: 130;
  stroke-dashoffset: 130;
  animation: tick 0.4s ease-out 0.8s forwards;
}
@keyframes spiral { to { clip-path: circle(75% at 50% 50%); } }
@keyframes tick   { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-symbol .spiral, .hero-symbol .tick { animation: none; clip-path: none; stroke-dashoffset: 0; }
}

/* Apps */

#apps .wrap { max-width: calc(760px + 2 * var(--gutter)); }

.apps-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}
.app-card {
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 32px;
  background: var(--cream);
}
.app-card:hover { border-color: var(--moss); }
.app-card img {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  margin-bottom: 24px;
}
.app-card h3 { margin-bottom: 8px; }
.app-card p { margin-bottom: 16px; }

.pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--forest);
  font-size: 15px;
  line-height: 1.5;
}
.pill--shipped { background: var(--clay); color: var(--cream); }

/* Company details: a plain definition list. */

.details {
  margin: 32px 0 0;
  border-top: 1px solid var(--sand);
}
.details > div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 8px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sand);
}
.details dt { margin: 0; }
.details dd { margin: 0; }
.details small { display: block; font-size: 15px; }

/* Footer */

.site-footer {
  background: var(--forest);
  color: var(--cream);
  padding: 56px 0;
  font-size: 15px;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--sand); }
.site-footer a:focus-visible { outline-color: var(--cream); }
.footer-lockup { width: 125px; height: 32px; margin-bottom: 24px; }
.site-footer p { margin: 0 0 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }

/* Legal pages */

.legal main > section { padding-top: 64px; }
.legal h1 { font-size: 36px; line-height: 1.2; margin-bottom: 8px; }
.legal h2 { font-size: 24px; margin: 40px 0 12px; }
.legal .lang { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--sand); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.muted { font-size: 16px; }

/* One breakpoint. */

@media (max-width: 720px) {
  :root { --section: 64px; --gutter: 20px; }

  .site-header { position: static; }
  .brand-lockup { display: none; }
  .brand-symbol { display: block; }
  .site-nav { display: none; }

  .menu { display: block; }
  .menu summary {
    cursor: pointer;
    list-style: none;
    padding: 8px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu nav {
    position: absolute;
    right: var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
    background: var(--cream);
    border: 1px solid var(--sand);
    border-radius: 12px;
  }
  .menu nav a { text-decoration: none; padding: 6px 0; }

  .hero-symbol { width: 180px; height: 138px; }
  .hero h1 { font-size: 34px; line-height: 42px; }
  .hero p { font-size: 18px; }

  .apps-row { grid-template-columns: minmax(0, 1fr); }
  .details > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
