/* ==========================================================================
   Affirmations & Co — site stylesheet
   Rebuilt as static HTML/CSS from the original "Affirmations" WordPress theme
   (Contrast UX). No build step, no frameworks.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --ink: #323B4B;          /* headings, body */
  --muted: #6B727F;        /* paragraphs */
  --accent: #377DFF;       /* buttons, links */
  --accent-soft: rgba(55, 125, 255, 0.6);
  --line: #DBDBDB;
  --white: #fff;
  --dark: #323B4B;         /* dark sections */
  --error: #B30031;
  --success: #00A160;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Song Myung", "SongMyung", Georgia, serif;
  --font-footer: "DM Serif Display", "DMSerifDisplay", Georgia, serif;

  --nav-h: 120px;
  --nav-h-shrunk: 80px;
  --section-pad: 100px;
  --container: 1620px;
  --radius-pill: 200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, img, ul, ol, li,
form, label, table, tr, td, th, header, footer, nav, section, article {
  margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}
header, footer, nav, section, article, main { display: block; }
ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
a { text-decoration: none; color: inherit; }
img { width: 100%; height: auto; display: inline-block; }
input, textarea, button { font: inherit; outline: none; -webkit-appearance: none; appearance: none; }
input[type="submit"], button { cursor: pointer; }
html { scroll-behavior: smooth; }
body { line-height: 1; }

/* ---------- Page frame ---------- */
#page {
  font: 24px/1.5 var(--font-body);
  background-color: var(--white);
  color: var(--ink);
  overflow: hidden;
  padding-top: calc(var(--nav-h) + 12px);
}
.main-content { min-height: calc(100vh - var(--nav-h) - 220px); }
.main-content.home-main { font-size: 24px; }
.main-content.page-main { font-size: 20px; }
.main-content.page-main .grid-container { max-width: 768px; }
.main-content.page-main .textbox p { max-width: none; }
header + section { padding-top: 40px; }

.grid-container {
  width: 100%;
  max-width: var(--container);
  padding: 0 20px;
  margin: auto;
}

/* ---------- Type ---------- */
.title { font: 64px/1.25 var(--font-title); }
p { color: var(--muted); max-width: 660px; }
.textbox { max-width: 840px; margin: auto; text-align: center; }
.textbox p, .textbox a { margin-right: auto; margin-left: auto; }
.textbox .title { max-width: 840px; margin: auto; }
.textbox p { margin-top: 8px; margin-bottom: 32px; }
.textbox.ltr, section.feature-1 .textbox { text-align: left; }
.textbox.ltr p, .textbox.ltr a,
section.feature-1 .textbox p, section.feature-1 .textbox a { margin-right: 0; margin-left: 0; }

/* ---------- Buttons & links ---------- */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 20px/1.2 var(--font-body);
  height: 60px;
  width: fit-content;
  min-width: 320px;
  padding: 0 6px;
  text-align: center;
  border-radius: var(--radius-pill);
  background-color: var(--accent);
  color: var(--white);
  transition: background-color 0.2s;
}
.button:hover { color: var(--white); background-color: var(--accent-soft); }
.button.p2 {
  color: var(--ink);
  background-color: transparent;
  border: 1px solid;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.button.p2:hover { color: var(--white); background-color: var(--accent); border-color: transparent; }

.link { transition: color 0.2s; color: rgba(50, 59, 75, 0.9); }
.link:hover { cursor: pointer; color: var(--accent); }

/* ---------- Store badges ---------- */
.store-badges { display: inline-flex; gap: 16px; }
.store-badges a.button.badge {
  width: fit-content; min-width: unset; padding: 0; margin: 0;
  border: 0; border-radius: 0; background-color: transparent;
}
.store-badges a.button.badge img { height: 100%; width: auto; }
.store-badges a.button.badge:hover { background-color: transparent; }

/* ---------- Dark sections ---------- */
section.feature-2, section.promotion { background-color: var(--dark); }
section.feature-2 .textbox .title, section.promotion .textbox .title { color: var(--white); }
section.feature-2 .textbox p, section.promotion .textbox p { color: rgba(255, 255, 255, 0.7); }
section.promotion .textbox p a { color: var(--white); text-decoration: underline; }
section.promotion .textbox p a:hover { color: var(--accent); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0;
  z-index: 100;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav .grid-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-h);
  transition: height 0.3s;
}
.nav.shrink .grid-container { height: var(--nav-h-shrunk); transition-duration: 0.5s; }
.nav .logo, .nav .mobile-menu-logo { width: 130px; }
.nav .logo a { display: block; }
.nav .mobile-menu-btn, .nav .mobile-menu-logo { display: none; }
.nav .main-menu { display: flex; align-items: center; column-gap: 32px; font-size: 16px; }
.nav .main-menu .link { color: var(--ink); }
.nav .main-menu .link:hover { color: var(--accent); }
.nav .main-menu .button { height: 48px; font-size: 14px; min-width: 160px; }

/* Logo-only variant (matches the live site, whose menu is hidden).
   Add class "nav--logo-only" to <nav> to use it. */
.nav.nav--logo-only .grid-container { justify-content: center; }
.nav.nav--logo-only .mobile-menu-btn,
.nav.nav--logo-only .main-menu-container { display: none !important; }

/* ---------- Hero ---------- */
header.hero { text-align: center; }
header.hero .img-box img { max-width: 1120px; margin: auto; display: block; }
header.hero .img-box { margin-top: 8px; }

/* ---------- Sections ---------- */
section, footer { padding: var(--section-pad) 0; }

/* Features (cards) */
section.features .feature-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  column-gap: 20px;
  row-gap: 32px;
}
section.features .feature-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 0 0;
  max-width: 320px;
  text-align: center;
  padding: 20px 20px 40px;
  background-color: var(--white);
  box-shadow: 0 2px 56px rgba(0, 0, 0, 0.05);
  border-radius: 30px;
}
section.features .feature-card .emoji { font-size: 55px; line-height: inherit; }
section.features .feature-card p { margin: 0; }

/* Feature 1 — text left, phone art right (art doubles as section background) */
section.feature-1 {
  background-repeat: no-repeat;
  background-position: right var(--section-pad);
  background-size: calc(50% + 100px);
}
section.feature-1 .grid-container { display: flex; flex-direction: row; justify-content: space-between; }
section.feature-1 .textbox { max-width: 680px; }
section.feature-1 .img-box { max-width: 50%; }
section.feature-1 .img-box img { opacity: 0; } /* spacer; the visible copy is the background */

/* Feature 2 — dark, centered, wide image */
section.feature-2 .textbox { max-width: 1200px; }
section.feature-2 .textbox + .img-box { margin-top: 32px; }

/* FAQ accordion */
section.faq .faq-item { padding: 28px 0; border-bottom: 1px solid var(--line); }
section.faq .faq-item .item-header {
  display: flex; flex-direction: row; justify-content: space-between; align-items: center;
  width: 100%; background: none; text-align: left; color: inherit; cursor: pointer;
}
section.faq .faq-item .item-header h3 { font-size: 28px; line-height: 1; }
section.faq .faq-item .item-header .icon-box { width: 48px; height: 48px; padding: 6px; flex: 0 0 auto; }
section.faq .faq-item .item-header .icon {
  display: block; width: 100%; height: 100%; border-radius: 100px;
  background: var(--white) url("../img/plus-icon.svg") no-repeat center / 50%;
  box-shadow: 0 2.8px 78px rgba(0, 0, 0, 0.13);
  transition: transform 0.3s, background-color 0.3s;
}
section.faq .faq-item .item-body {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease;
}
section.faq .faq-item .item-body > div { overflow: hidden; }
section.faq .faq-item .item-body p { max-width: 840px; padding-top: 12px; margin: 0; }
section.faq .faq-item .item-body a { color: var(--accent); }
section.faq .faq-item .item-body a:hover { text-decoration: underline; }
section.faq .faq-item.open .item-body { grid-template-rows: 1fr; }
section.faq .faq-item.open .item-header .icon {
  transform: rotate(180deg);
  background-image: url("../img/minus-icon.svg");
  background-color: var(--accent);
}

/* ---------- Contact form ---------- */
form.contact-form { font-size: 20px; color: var(--ink); max-width: 408px; margin: auto; text-align: left; }
form.contact-form p { text-align: left; margin-top: 0; margin-bottom: 20px; max-width: none; color: var(--ink); }
form.contact-form label { display: block; }
form.contact-form input, form.contact-form textarea { width: 100%; }
form.contact-form input:not([type="submit"]), form.contact-form textarea {
  margin-top: 8px;
  height: 60px;
  border-radius: var(--radius-pill);
  padding: 0 30px;
  color: var(--ink);
  background-color: var(--white);
  font-weight: normal;
  border: 2px solid rgba(107, 114, 127, 0.5);
  transition: border-color 0.3s, color 0.3s;
}
form.contact-form input:not([type="submit"]):focus, form.contact-form textarea:focus,
form.contact-form input:not([type="submit"]):not(:placeholder-shown), form.contact-form textarea:not(:placeholder-shown) {
  border-color: var(--muted);
}
form.contact-form textarea { height: 160px; padding: 16px 30px; border-radius: 24px; resize: vertical; }
form.contact-form input[type="submit"] { border: 0; margin-top: 16px; width: 100%; min-width: 0; }
form.contact-form .form-response { color: var(--error); font-size: 16px; margin-top: 8px; min-height: 1em; }
form.contact-form.sent .form-response { color: var(--success); }
form.contact-form .hp { position: absolute; left: -9999px; }

/* ---------- Data request (DSAR) form ---------- */
#main.data-request .textbox p { max-width: 640px; }
form.dsar-form { max-width: 640px; }
form.dsar-form .req { color: var(--error); }
form.dsar-form input[readonly] { background-color: #f5f6f8; color: var(--muted); cursor: default; }
form.dsar-form select {
  margin-top: 8px; width: 100%; height: 60px; border-radius: var(--radius-pill); padding: 0 56px 0 30px;
  color: var(--ink); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%23323B4B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 24px center;
  border: 2px solid rgba(107, 114, 127, 0.5); transition: border-color 0.3s; cursor: pointer;
  -webkit-appearance: none; appearance: none; font: inherit;
}
form.dsar-form select:focus, form.dsar-form select:valid { border-color: var(--muted); }
form.dsar-form select:invalid { color: var(--muted); }
form.dsar-form .choice-group { border: 0; padding: 0; margin: 0 0 20px; }
form.dsar-form .choice-group legend { padding: 0; margin-bottom: 8px; }
form.dsar-form .choice { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; font-size: 0.85em; line-height: 1.45; color: var(--muted); }
form.dsar-form .choice input[type="radio"], form.dsar-form .choice input[type="checkbox"] {
  flex: 0 0 auto; width: 20px; height: 20px; min-width: 0; margin: 2px 0 0; padding: 0;
  border: 2px solid rgba(107, 114, 127, 0.6); background: var(--white); cursor: pointer;
  display: grid; place-content: center; transition: border-color 0.2s, background-color 0.2s;
}
form.dsar-form .choice input[type="radio"] { border-radius: 50%; }
form.dsar-form .choice input[type="checkbox"] { border-radius: 5px; }
form.dsar-form .choice input::before { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform 0.15s; }
form.dsar-form .choice input[type="radio"]::before { border-radius: 50%; background: var(--white); }
form.dsar-form .choice input[type="checkbox"]::before { width: 6px; height: 11px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); margin-top: -2px; }
form.dsar-form .choice input:checked { background: var(--accent); border-color: var(--accent); }
form.dsar-form .choice input[type="radio"]:checked::before { transform: scale(1); }
form.dsar-form .choice input[type="checkbox"]:checked::before { transform: rotate(45deg) scale(1); }
form.dsar-form .choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form.dsar-form .choice:hover input:not(:checked) { border-color: var(--muted); }
form.dsar-form .char-count { display: block; text-align: right; font-size: 14px; color: var(--muted); margin-top: 6px; }
form.dsar-form .field-error input, form.dsar-form .field-error select, form.dsar-form .field-error textarea { border-color: var(--error); }
form.dsar-form .choice-group.field-error legend { color: var(--error); }
.dsar-success { text-align: center; padding: 20px 0 40px; }
.dsar-success h2 { font: 36px/1.25 var(--font-title); margin-bottom: 16px; }
.dsar-success p { max-width: 640px; font-size: 16px; margin-bottom: 16px; }
.dsar-success .button { margin-top: 16px; }

/* ---------- Footer ---------- */
footer .grid-container { display: flex; flex-direction: row; justify-content: left; }
footer .footer-col { width: calc(100% / 3); padding-left: 100px; padding-right: 100px; }
footer .footer-col .menu-header { padding-bottom: 12px; border-bottom: 1px solid; margin-bottom: 20px; }
footer .footer-col .menu-header h3 { font: 20px/28px var(--font-footer); }
footer .footer-col.footer-header .logo { width: 208px; padding-bottom: 20px; }
footer .footer-col.footer-header .footer-subtext { font-size: 16px; color: var(--muted); text-align: left; }
footer .footer-menu li a { display: block; padding-bottom: 20px; font-size: 16px; color: var(--muted); }
footer .footer-menu li a:hover { color: var(--ink); }
footer .social-menu { display: flex; gap: 32px; }
footer .social-menu img { width: 40px; height: 40px; }

/* ---------- Privacy policy (long-form text) ---------- */
.policy { text-align: left; font-size: 16px; line-height: 1.7; color: var(--ink); }
.policy .policy-updated { color: var(--muted); font-weight: 600; margin: 0 0 32px; }
.policy h2 { font: 600 22px/1.3 var(--font-body); margin: 40px 0 12px; scroll-margin-top: 100px; }
.policy h3 { font: 600 18px/1.4 var(--font-body); margin: 24px 0 8px; scroll-margin-top: 100px; }
.policy p { margin: 0 0 14px; max-width: none; scroll-margin-top: 100px; }
.policy ul, .policy ol { margin: 0 0 16px 24px; }
.policy ul { list-style: square; }
.policy ol.toc { list-style: none; margin-left: 0; }
.policy ol.toc li { margin-bottom: 6px; }
.policy li { margin-bottom: 6px; color: var(--muted); }
.policy a { color: var(--accent); }
.policy a:hover { text-decoration: underline; }
.policy .table-wrap { overflow-x: auto; margin: 0 0 20px; }
.policy table { width: 100%; font-size: 14px; }
.policy td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; color: var(--muted); }
.policy tr:first-child td { color: var(--ink); background: #f5f6f8; }
#main.privacy-policy header.hero { text-align: center; padding-bottom: 0; }

/* ---------- 404 ---------- */
.error-page section { padding-top: 40px; }
.error-page .textbox p { margin-bottom: 32px; }

/* ==========================================================================
   Entry animations (replacement for the theme's "aio" jQuery plugin).
   Elements with .aio (single) or .aio-parent (stagger children) start hidden
   and get .in when scrolled into view — see main.js.
   ========================================================================== */
.aio, .aio-parent > * { opacity: 0; transition: opacity 0.4s, translate 0.4s; }
.aio.in, .aio-parent.in > * { opacity: 1; translate: 0; }
.slide-up, .slide-items-up > * { translate: 0 20px; }
.slide-right, .slide-items-right > * { translate: -20px 0; }
.slide-left, .slide-items-left > * { translate: 20px 0; }
.aio-parent > *:nth-child(1) { transition-delay: 0s; }
.aio-parent > *:nth-child(2) { transition-delay: 0.1s; }
.aio-parent > *:nth-child(3) { transition-delay: 0.2s; }
.aio-parent > *:nth-child(4) { transition-delay: 0.3s; }
.aio-parent > *:nth-child(5) { transition-delay: 0.4s; }
.aio-parent > *:nth-child(6) { transition-delay: 0.5s; }
@media (prefers-reduced-motion: reduce) {
  .aio, .aio-parent > * { opacity: 1; translate: 0; transition: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Media queries
   ========================================================================== */
@media screen and (max-width: 1200px) {
  :root { --nav-h: 70px; --section-pad: 40px; }
  #page { padding-top: var(--nav-h); }
  .title { font-size: 36px; }
  p { font-size: 16px; }
  .button { height: 48px; font-size: 16px; min-width: 220px; }
  .textbox p { font-size: 16px; max-width: 480px; margin-bottom: 20px; }
  .nav.shrink .grid-container { height: var(--nav-h); }
  .nav .main-menu .link { font-size: 14px; }
  section.features .feature-cards { gap: 20px; }
  section.features .feature-card { max-width: 220px; padding: 10px 15px 20px; }
  section.features .feature-card .emoji { font-size: 30px; }
  section.faq .faq-item { padding: 16px 0; }
  section.faq .faq-item .item-header h3 { font-size: 16px; }
  section.faq .faq-item .item-header .icon-box { width: 32px; height: 32px; padding: 4px; }
  section.faq .faq-item .item-body { font-size: 14px; }
  form.contact-form { font-size: 16px; }
  form.contact-form input:not([type="submit"]) { height: 48px; }
  form.dsar-form select { height: 48px; }
  .dsar-success h2 { font-size: 28px; }
  footer .footer-col { padding-left: 40px; padding-right: 40px; }
}

@media screen and (max-width: 768px) {
  /* Mobile menu */
  .nav .mobile-menu-btn { width: 24px; height: 24px; display: block; z-index: 10; background: none; }
  .nav .mobile-menu-btn .icon {
    display: block; width: 100%; height: 100%;
    background: url("../img/mobile-menu.svg") no-repeat; transition: background 0.3s;
  }
  .nav .mobile-menu-btn.active .icon { background-image: url("../img/mobile-menu-close.svg"); }
  .nav .main-menu-container {
    display: none;
    position: absolute; left: 0; top: 0; width: 100%; height: auto;
    background: var(--dark);
    padding: 20px 20px 40px;
    opacity: 0; transition: opacity 0.3s;
  }
  .nav .main-menu-container.open { display: block; opacity: 1; }
  .nav .main-menu-container .mobile-menu-logo { display: block; margin-bottom: 40px; }
  .nav .main-menu { flex-direction: column; gap: 30px; align-items: start; }
  .nav .main-menu .link { color: var(--white); }

  section.features .feature-cards { gap: 12px; justify-content: flex-start; }
  section.features .feature-card { max-width: calc(50% - 6px); min-width: calc(50% - 6px); }
  section.features .feature-card .emoji { font-size: 56px; }

  section.feature-1 { background-position: center bottom; background-size: contain; }
  section.feature-1 .grid-container { flex-direction: column; }
  section.feature-1 .grid-container .img-box { max-width: none; }

  section.feature-2 .grid-container .img-box { padding-bottom: 40px; }
  section.feature-2 .grid-container .img-box img { width: 150%; height: auto; left: -25%; position: relative; }

  footer .grid-container { flex-direction: column; row-gap: 20px; }
  footer .footer-col { width: 100%; padding-left: 0; padding-right: 0; }
  footer .footer-col.footer-menu-container { order: 1; }
  footer .footer-col.footer-menu-container .footer-menu li a { width: fit-content; padding-right: 16px; }
  footer .footer-col.social-menu-container { order: 2; }
  footer .footer-col.footer-header { order: 3; }
}
