/* Cloud Hour: components. Built only from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ch-cloud);
  color: var(--ch-ink);
  font-family: var(--ch-font-body);
  font-size: var(--ch-text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ch-sky-pale); }

/* Layout */
.ch-container { width: 100%; max-width: var(--ch-container); margin: 0 auto; padding: 0 var(--ch-gutter); }
.ch-narrow { width: 100%; max-width: var(--ch-narrow); margin: 0 auto; padding: 0 var(--ch-gutter); }
.ch-section { padding: var(--ch-space-7) 0; }
.ch-section--white { background: var(--ch-white); }
.ch-section--mist { background: var(--ch-mist); }
.ch-section--line { border-top: var(--ch-border); }
@media (max-width: 640px) {
  :root { --ch-gutter: 20px; }
  .ch-section { padding: var(--ch-space-6) 0; }
}

/* Type */
.ch-hero-title, .ch-h2, .ch-h3, .ch-logo {
  font-family: var(--ch-font-display);
  font-weight: 300;
  letter-spacing: var(--ch-track-display);
  text-transform: lowercase;
  margin: 0;
}
.ch-hero-title { font-size: var(--ch-text-hero); line-height: 1; }
.ch-h2 { font-size: var(--ch-text-h2); line-height: 1.05; }
.ch-h3 { font-size: var(--ch-text-h3); line-height: 1.2; font-weight: 400; }
.ch-italic { font-style: italic; }
.ch-dusk-word { color: var(--ch-dusk); font-style: italic; }
.ch-lead { font-size: var(--ch-text-lead); line-height: 1.55; color: var(--ch-soft); max-width: 560px; margin: var(--ch-space-4) 0 0; }
.ch-label {
  display: inline-block;
  font-size: var(--ch-text-tiny);
  font-weight: 600;
  letter-spacing: var(--ch-track-label);
  text-transform: uppercase;
  color: var(--ch-faint);
  margin: 0 0 var(--ch-space-3);
}
.ch-small { font-size: var(--ch-text-small); color: var(--ch-soft); }

/* Buttons: square boxes, no radius, no shadow */
.ch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ch-space-2);
  font-family: var(--ch-font-display);
  font-size: 18px; font-weight: 400; text-transform: lowercase; letter-spacing: 0;
  padding: 12px 26px;
  border: 1px solid transparent; border-radius: var(--ch-radius);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .4s var(--ch-ease), color .4s var(--ch-ease), border-color .4s var(--ch-ease);
}
.ch-btn--ink { background: var(--ch-ink); color: var(--ch-white); }
.ch-btn--ink:hover { background: var(--ch-sky-deep); }
.ch-btn--line { background: transparent; color: var(--ch-ink); border-color: var(--ch-ink); }
.ch-btn--line:hover { background: var(--ch-ink); color: var(--ch-white); }
.ch-btn--white { background: var(--ch-white); color: var(--ch-sky-deep); }
.ch-btn--white:hover { background: var(--ch-sky-pale); }
.ch-btn--ghost { background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--ch-on-sky); border-color: var(--ch-on-sky); }
.ch-btn--ghost:hover { background: var(--ch-white); color: var(--ch-sky-deep); }
.ch-btn--text { background: none; padding: 12px 4px; color: inherit; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ch-btn--sm { font-size: 16px; padding: 8px 18px; }
.ch-btn--block { width: 100%; }

/* Nav: floats over the sky, white text */
.ch-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; color: var(--ch-on-sky); }
.ch-nav--solid { position: relative; color: var(--ch-ink); background: var(--ch-cloud); border-bottom: var(--ch-border); }
.ch-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--ch-space-4); padding: 22px var(--ch-gutter); }
.ch-logo { font-size: 30px; font-style: italic; font-weight: 400; text-decoration: none; color: inherit; letter-spacing: -0.01em; }
.ch-nav__note { font-size: var(--ch-text-small); text-decoration: none; opacity: .9; }
.ch-nav__note:hover { text-decoration: underline; text-underline-offset: 4px; }
.ch-nav__links { display: flex; align-items: center; gap: var(--ch-space-5); }
.ch-nav__links a { font-family: var(--ch-font-display); font-size: 18px; text-decoration: none; }
.ch-nav__links a:not(.ch-btn):hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (max-width: 860px) {
  .ch-nav__note, .ch-nav__hide { display: none; }
  .ch-nav__links { gap: var(--ch-space-4); }
}

/* Sky: the signature. Full-bleed dusty blue with drawn, blurred clouds that drift */
.ch-sky {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ch-sky-gradient);
  color: var(--ch-on-sky);
  min-height: min(92vh, 880px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.ch-sky::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(38, 66, 86, .12) 0%, transparent 30%, transparent 45%, rgba(38, 66, 86, .3) 100%); }
.ch-sky--dusk { background: var(--ch-dusk-gradient); }
.ch-sky--short { min-height: min(56vh, 520px); }
.ch-sky--panel { min-height: 0; aspect-ratio: 16 / 7; }
.ch-clouds { position: absolute; inset: -10% -20%; z-index: -1; animation: ch-drift var(--ch-drift) linear infinite alternate; }
.ch-cloud {
  position: absolute; border-radius: var(--ch-radius-dot);
  background:
    radial-gradient(closest-side, var(--ch-cloud-puff) 0%, var(--ch-cloud-puff) 45%, transparent 100%),
    radial-gradient(closest-side at 50% 70%, var(--ch-cloud-shade), transparent);
  filter: blur(var(--ch-blur-cloud));
}
.ch-cloud::before, .ch-cloud::after {
  content: ""; position: absolute; border-radius: var(--ch-radius-dot);
  background: radial-gradient(closest-side, var(--ch-cloud-puff) 0%, var(--ch-cloud-puff) 40%, transparent 100%);
}
.ch-cloud::before { width: 75%; height: 85%; left: -30%; top: 30%; }
.ch-cloud::after { width: 65%; height: 80%; right: -25%; top: -30%; }
@keyframes ch-drift { from { transform: translateX(0); } to { transform: translateX(8%); } }
@media (prefers-reduced-motion: reduce) { .ch-clouds { animation: none; } }

.ch-sky__body { position: relative; padding: 0 var(--ch-gutter) var(--ch-space-6); max-width: var(--ch-container); width: 100%; margin: 0 auto; }
.ch-sky .ch-lead { color: var(--ch-on-sky); text-shadow: 0 1px 18px rgba(31, 60, 80, .45); }
.ch-sky .ch-hero-title, .ch-sky .ch-h2 { text-shadow: 0 2px 30px rgba(31, 60, 80, .25); }
.ch-sky .ch-label { color: var(--ch-on-sky); text-shadow: 0 1px 12px rgba(31, 60, 80, .5); }
.ch-sky__actions { display: flex; flex-wrap: wrap; gap: var(--ch-space-3); margin-top: var(--ch-space-5); }

/* Floating quote: a white dot and one or two short lines hanging in the sky */
.ch-float { position: absolute; display: flex; gap: 18px; max-width: 300px; font-size: 16px; line-height: 1.45; color: var(--ch-on-sky); text-shadow: 0 1px 12px rgba(31, 60, 80, .25); }
.ch-float::before { content: ""; flex: 0 0 10px; height: 10px; margin-top: 7px; border-radius: var(--ch-radius-dot); background: var(--ch-white); }
.ch-float--dusk::before { background: var(--ch-dusk); }
@media (max-width: 640px) { .ch-float { position: relative; inset: auto !important; margin: 0 var(--ch-gutter) var(--ch-space-4); } }

/* Strip: one quiet line between sections */
.ch-strip { border-top: var(--ch-border); border-bottom: var(--ch-border); padding: 18px 0; background: var(--ch-white); overflow-x: clip; }
.ch-strip__row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ch-space-2) var(--ch-space-5); font-family: var(--ch-font-display); font-size: 18px; color: var(--ch-soft); text-transform: lowercase; }
.ch-strip__row span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.ch-strip__row span::before { content: ""; width: 6px; height: 6px; border-radius: var(--ch-radius-dot); background: var(--ch-sky); }

/* Split: big headline left, small text right */
.ch-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--ch-space-6); align-items: end; }
@media (max-width: 860px) { .ch-split { grid-template-columns: 1fr; gap: var(--ch-space-4); } }

/* Cards: white, hairline, square, lots of air */
.ch-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--ch-border); border-left: var(--ch-border); }
.ch-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .ch-grid, .ch-grid--2 { grid-template-columns: 1fr; } }
.ch-card { background: var(--ch-white); border-right: var(--ch-border); border-bottom: var(--ch-border); padding: var(--ch-space-5) var(--ch-space-5) var(--ch-space-6); }
.ch-card__num { font-family: var(--ch-font-display); font-size: var(--ch-text-small); color: var(--ch-faint); margin-bottom: var(--ch-space-6); }
.ch-card__title { font-family: var(--ch-font-display); font-weight: 400; font-size: var(--ch-text-h3); text-transform: lowercase; margin: 0 0 var(--ch-space-2); }
.ch-card__text { color: var(--ch-soft); margin: 0; }
.ch-card__sky { height: 140px; margin: calc(var(--ch-space-5) * -1) calc(var(--ch-space-5) * -1) var(--ch-space-5); position: relative; overflow: hidden; isolation: isolate; background: var(--ch-sky-gradient); }
.ch-card__sky--dusk { background: var(--ch-dusk-gradient); }

/* Badge */
.ch-badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--ch-text-tiny); font-weight: 600; letter-spacing: var(--ch-track-label); text-transform: uppercase; padding: 5px 10px; border: var(--ch-border); background: var(--ch-white); color: var(--ch-soft); white-space: nowrap; }
.ch-badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--ch-radius-dot); background: var(--ch-sky); }
.ch-badge--dusk::before { background: var(--ch-dusk); }
.ch-badge--sky { background: transparent; border: var(--ch-border-sky); color: var(--ch-on-sky); }
.ch-badge--sky::before { background: var(--ch-white); }

/* Quote */
.ch-quote { font-family: var(--ch-font-display); font-weight: 300; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.2; letter-spacing: var(--ch-track-display); margin: 0; text-transform: lowercase; }
.ch-quote__by { display: flex; align-items: center; gap: 12px; margin-top: var(--ch-space-4); font-size: var(--ch-text-small); color: var(--ch-soft); }
.ch-quote__by::before { content: ""; width: 10px; height: 10px; border-radius: var(--ch-radius-dot); background: var(--ch-sky); }

/* Stats */
.ch-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ch-space-5); }
@media (max-width: 640px) { .ch-stats { grid-template-columns: 1fr; } }
.ch-stat__num { font-family: var(--ch-font-display); font-weight: 300; font-size: clamp(48px, 6vw, 80px); line-height: 1; letter-spacing: -0.03em; }
.ch-stat__label { color: var(--ch-soft); font-size: var(--ch-text-small); margin-top: var(--ch-space-2); border-top: var(--ch-border); padding-top: var(--ch-space-2); }

/* Segmented toggle */
.ch-toggle { display: inline-flex; border: 1px solid var(--ch-ink); }
.ch-toggle button { font-family: var(--ch-font-display); font-size: 16px; text-transform: lowercase; border: 0; background: transparent; color: var(--ch-ink); padding: 8px 20px; cursor: pointer; white-space: nowrap; }
.ch-toggle button[aria-pressed="true"] { background: var(--ch-ink); color: var(--ch-white); }

/* Pricing */
.ch-plans { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--ch-border); border-left: var(--ch-border); }
@media (max-width: 960px) { .ch-plans { grid-template-columns: 1fr; } }
.ch-plan { position: relative; background: var(--ch-white); border-right: var(--ch-border); border-bottom: var(--ch-border); padding: var(--ch-space-5); display: flex; flex-direction: column; }
.ch-plan--featured { background: var(--ch-sky-gradient); color: var(--ch-on-sky); border-color: transparent; overflow: hidden; isolation: isolate; }
.ch-plan--featured .ch-plan__desc, .ch-plan--featured .ch-plan__list li, .ch-plan--featured .ch-plan__per { color: var(--ch-on-sky-soft); }
.ch-plan > .ch-badge { align-self: flex-start; }
.ch-plan--featured .ch-cloud { opacity: .45; }
.ch-plan--featured .ch-plan__list li::before { background: var(--ch-white); }
.ch-plan__name { font-family: var(--ch-font-display); font-size: 28px; font-weight: 400; text-transform: lowercase; margin: var(--ch-space-3) 0 var(--ch-space-1); }
.ch-plan__desc { color: var(--ch-soft); margin: 0 0 var(--ch-space-5); min-height: 3.2em; }
.ch-plan__price { font-family: var(--ch-font-display); font-weight: 300; font-size: 64px; line-height: 1; letter-spacing: -0.03em; }
.ch-plan__per { font-size: var(--ch-text-small); color: var(--ch-soft); margin: var(--ch-space-2) 0 var(--ch-space-5); }
.ch-plan__list { list-style: none; padding: 0; margin: 0 0 var(--ch-space-5); flex: 1; }
.ch-plan__list li { position: relative; padding: 8px 0 8px 22px; border-top: var(--ch-border); color: var(--ch-soft); }
.ch-plan--featured .ch-plan__list li { border-top: var(--ch-border-sky); }
.ch-plan__list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 6px; height: 6px; border-radius: var(--ch-radius-dot); background: var(--ch-sky); }

/* Comparison table */
.ch-table-wrap { overflow-x: auto; border: var(--ch-border); background: var(--ch-white); }
.ch-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: var(--ch-text-small); }
.ch-table th, .ch-table td { text-align: left; padding: 14px 18px; border-bottom: var(--ch-border); }
.ch-table thead th { font-family: var(--ch-font-display); font-weight: 400; font-size: 18px; text-transform: lowercase; background: var(--ch-mist); }
.ch-table tbody tr:last-child td { border-bottom: 0; }
.ch-table__yes::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: var(--ch-radius-dot); background: var(--ch-sky); }
.ch-table__no { color: var(--ch-faint); }

/* FAQ */
.ch-faq { border-top: var(--ch-border); }
.ch-faq details { border-bottom: var(--ch-border); }
.ch-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--ch-space-4); padding: 22px 0; font-family: var(--ch-font-display); font-size: 22px; text-transform: lowercase; }
.ch-faq summary::-webkit-details-marker { display: none; }
.ch-faq summary::after { content: ""; flex: 0 0 10px; height: 10px; margin-top: 10px; border-radius: var(--ch-radius-dot); border: 1px solid var(--ch-ink); transition: background .3s; }
.ch-faq details[open] summary::after { background: var(--ch-ink); }
.ch-faq p { margin: 0 0 22px; color: var(--ch-soft); max-width: 600px; }

/* Article */
.ch-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--ch-text-small); color: var(--ch-soft); }
.ch-meta span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: var(--ch-radius-dot); background: var(--ch-faint); margin-right: 14px; vertical-align: middle; }
.ch-author { display: flex; align-items: center; gap: 14px; margin-top: var(--ch-space-4); }
.ch-avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--ch-radius-dot); background: var(--ch-sky-gradient); display: grid; place-items: center; color: var(--ch-white); font-family: var(--ch-font-display); font-style: italic; font-size: 18px; }
.ch-author__name { font-weight: 600; }
.ch-author--card { border-top: var(--ch-border); border-bottom: var(--ch-border); padding: var(--ch-space-4) 0; margin-top: var(--ch-space-6); }
.ch-prose { font-size: 18px; line-height: 1.75; }
.ch-prose p { margin: 0 0 1.3em; }
.ch-prose h2 { font-family: var(--ch-font-display); font-weight: 300; font-size: 36px; line-height: 1.1; letter-spacing: var(--ch-track-display); text-transform: lowercase; margin: 1.8em 0 .5em; }
.ch-prose h3 { font-family: var(--ch-font-body); font-weight: 600; font-size: 19px; margin: 1.6em 0 .4em; }
.ch-prose ul { padding: 0; list-style: none; margin: 0 0 1.3em; }
.ch-prose li { position: relative; padding-left: 24px; margin-bottom: .5em; }
.ch-prose li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: var(--ch-radius-dot); background: var(--ch-sky); }
.ch-prose blockquote { margin: 1.6em 0; padding: 0 0 0 28px; border-left: 1px solid var(--ch-ink); font-family: var(--ch-font-display); font-weight: 300; font-size: 30px; line-height: 1.25; text-transform: lowercase; }
.ch-prose code { font-size: .9em; background: var(--ch-mist); padding: 2px 6px; }
.ch-prose figure { margin: 2em 0; }
.ch-prose figcaption { font-size: var(--ch-text-small); color: var(--ch-faint); margin-top: 10px; }
.ch-callout { background: var(--ch-white); border: var(--ch-border); border-left: 3px solid var(--ch-sky); padding: var(--ch-space-4); margin: 1.6em 0; font-size: 16px; }
.ch-callout strong { display: block; font-family: var(--ch-font-display); font-weight: 400; font-size: 20px; text-transform: lowercase; margin-bottom: 4px; }
.ch-post { display: block; text-decoration: none; background: var(--ch-white); border: var(--ch-border); }
.ch-post__thumb { height: 160px; position: relative; overflow: hidden; isolation: isolate; background: var(--ch-sky-gradient); }
.ch-post__thumb--dusk { background: var(--ch-dusk-gradient); }
.ch-post__body { padding: var(--ch-space-4); }
.ch-post__title { font-family: var(--ch-font-display); font-weight: 400; font-size: 22px; line-height: 1.2; text-transform: lowercase; margin: 6px 0; }
.ch-post:hover .ch-post__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Forms */
.ch-form { display: grid; gap: var(--ch-space-4); }
.ch-field { display: grid; gap: 6px; }
.ch-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ch-space-3); }
@media (max-width: 520px) { .ch-row { grid-template-columns: 1fr; } }
.ch-label-text { font-size: var(--ch-text-small); font-weight: 600; }
.ch-input, .ch-select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ch-ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ch-ink); border-radius: var(--ch-radius);
  padding: 10px 0; outline: none; transition: border-color .3s;
}
.ch-select { appearance: none; background-image: radial-gradient(circle, var(--ch-ink) 3px, transparent 3.5px); background-repeat: no-repeat; background-position: right 4px center; background-size: 10px 10px; cursor: pointer; }
.ch-input:focus, .ch-select:focus { border-bottom-color: var(--ch-sky); box-shadow: 0 1px 0 0 var(--ch-sky); }
.ch-input::placeholder { color: var(--ch-faint); }
.ch-input-wrap { position: relative; }
.ch-input-wrap .ch-input { padding-right: 56px; }
.ch-input-toggle { position: absolute; right: 0; bottom: 10px; border: 0; background: none; font: inherit; font-size: var(--ch-text-small); color: var(--ch-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ch-help { font-size: 13px; color: var(--ch-faint); }
.ch-error { font-size: 13px; color: var(--ch-error); }
.ch-field--error .ch-input { border-bottom-color: var(--ch-error); }
.ch-check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--ch-text-small); color: var(--ch-soft); cursor: pointer; }
.ch-check input { appearance: none; flex: 0 0 18px; height: 18px; margin: 2px 0 0; border: 1px solid var(--ch-ink); border-radius: var(--ch-radius); display: grid; place-items: center; cursor: pointer; }
.ch-check input:checked::after { content: ""; width: 8px; height: 8px; border-radius: var(--ch-radius-dot); background: var(--ch-ink); }
.ch-divider-text { display: flex; align-items: center; gap: var(--ch-space-3); color: var(--ch-faint); font-size: var(--ch-text-small); }
.ch-divider-text::before, .ch-divider-text::after { content: ""; flex: 1; height: 1px; background: var(--ch-line); }
.ch-btn--social { background: var(--ch-white); color: var(--ch-ink); border-color: var(--ch-line); font-family: var(--ch-font-body); font-size: 15px; text-transform: none; }
.ch-btn--social:hover { border-color: var(--ch-ink); }
.ch-btn__letter { width: 22px; height: 22px; display: grid; place-items: center; background: var(--ch-mist); font-weight: 600; font-size: 12px; }

/* Footer */
.ch-footer { background: var(--ch-white); border-top: var(--ch-border); padding: var(--ch-space-6) 0 var(--ch-space-4); font-size: var(--ch-text-small); }
.ch-footer__cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--ch-space-5); }
@media (max-width: 760px) { .ch-footer__cols { grid-template-columns: 1fr 1fr; } }
.ch-footer h4 { font-family: var(--ch-font-display); font-weight: 400; font-size: 18px; text-transform: lowercase; margin: 0 0 var(--ch-space-3); }
.ch-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ch-footer a { color: var(--ch-soft); text-decoration: none; }
.ch-footer a:hover { color: var(--ch-ink); }
.ch-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ch-space-3); margin-top: var(--ch-space-6); padding-top: var(--ch-space-3); border-top: var(--ch-border); color: var(--ch-faint); }

/* Entrance */
.ch-fade { animation: ch-fade 1.6s var(--ch-ease) both; }
@keyframes ch-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ch-fade { animation: none; } }

/* Phones: clouds are sized for wide screens, so thin them out so text stays on clear sky */
@media (max-width: 640px) {
  .ch-cloud { opacity: .45; }
  .ch-sky::after { background: linear-gradient(180deg, rgba(38, 66, 86, .2) 0%, rgba(38, 66, 86, .1) 40%, rgba(38, 66, 86, .4) 100%); }
}
