/* Frelia website - one stylesheet for every page.
   Palette comes from the app's Orchid theme (lib/core/theme/theme_palette.dart):
   primary #8F4C86, secondary #6E5868, tertiary #815344.
   No web fonts, no external resources - a system font stack only. */

:root {
  color-scheme: light dark;

  --brand: #8F4C86;
  --brand-strong: #6C3765;
  --brand-soft: #FBF0F7;
  --secondary: #6E5868;
  --tertiary: #815344;

  --text: #1F1A24;
  --text-muted: #534D59;
  --bg: #F7F6F9;
  --bg-raised: #FFFFFF;
  --bg-sunken: #F0EDF3;
  --border: #DED6E2;
  --border-strong: #8F4C86;
  --shadow: 0 1px 2px rgba(31, 26, 36, 0.06), 0 8px 24px rgba(31, 26, 36, 0.06);
  --focus: #6C3765;

  --radius: 16px;
  --radius-sm: 10px;
  --measure: 68ch;
  --page: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #E3A6DA;
    --brand-strong: #F0C8EA;
    --brand-soft: #2F1E33;
    --secondary: #CFBAC8;
    --tertiary: #E7B9A4;

    --text: #F3EEF5;
    --text-muted: #CFC3D3;
    --bg: #140E16;
    --bg-raised: #201824;
    --bg-sunken: #1A121D;
    --border: #3D2F42;
    --border-strong: #E3A6DA;
    --shadow: none;
    --focus: #F0C8EA;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

/* ---------- Shared primitives ---------- */

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

a {
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  a {
    color: var(--brand);
  }
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 3.2rem);
}

h2 {
  font-size: clamp(1.5rem, 4.2vw, 2rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 16px;
  max-width: var(--measure);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bg-raised);
  color: var(--text);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 600;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Site header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: block;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .site-nav a:hover {
    color: var(--brand-strong);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  border-top: 0;
}

.section-intro {
  max-width: var(--measure);
  color: var(--text-muted);
}

.eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: 10px;
}

@media (prefers-color-scheme: dark) {
  .eyebrow {
    color: var(--brand);
  }
}

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

.hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%);
}

.hero .lead {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  color: var(--text);
  max-width: 44ch;
}

.hero .sub {
  color: var(--text-muted);
  max-width: 52ch;
}

.store-note {
  display: inline-block;
  margin: 4px 0 20px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.button {
  display: inline-block;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  background: var(--brand-strong);
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--brand-strong);
}

.button:hover {
  background: #55284F;
  border-color: #55284F;
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .button {
    background: var(--brand);
    border-color: var(--brand);
    color: #180F1A;
  }

  .button:hover {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
  }
}

.hero-note {
  margin-top: 16px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------- Card grids ---------- */

.cards {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

@media (prefers-color-scheme: dark) {
  .card-tag {
    color: var(--brand);
    border-color: var(--border);
  }
}

.card h3 {
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .card h3 {
    color: var(--brand);
  }
}

.card p {
  margin-bottom: 0;
  color: var(--text-muted);
}

/* ---------- Privacy section ---------- */

.privacy-section {
  background: var(--bg-sunken);
}

.privacy-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .privacy-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.privacy-list li {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.privacy-list h3 {
  margin-bottom: 6px;
}

.privacy-list p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Screenshots & App Showcase ---------- */

.screens-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  margin-top: 36px;
}

@media (min-width: 600px) {
  .screens-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .screens-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.screen-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.screen-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.screen-card .phone-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.screen-card .phone {
  width: min(240px, 100%);
  padding: 10px;
  border-radius: 34px;
  margin: 0 auto 20px;
  background: #1B1420;
  border: 2px solid #3D2F42;
}

.screen-card .phone img {
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.screen-caption {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.screen-caption .card-tag {
  margin-bottom: 10px;
  align-self: flex-start;
}

.screen-caption h3 {
  font-size: 1.15rem;
  margin: 0 0 8px;
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .screen-caption h3 {
    color: var(--brand);
  }
}

.screen-caption p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.shot-layout {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1fr;
  margin-top: 24px;
}

@media (min-width: 820px) {
  .shot-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.phone-figure {
  margin: 0;
}

.phone {
  justify-self: center;
  margin: 0 auto;
  width: min(280px, 100%);
  padding: 12px;
  background: #1B1420;
  border: 2px solid #3D2F42;
  border-radius: 38px;
  box-shadow: var(--shadow);
}

.phone img {
  display: block;
  width: 100%;
  border-radius: 26px;
}

.caption {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: none;
}

/* ---------- Contact ---------- */

.contact-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-strong);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
  margin-top: 28px;
  max-width: 680px;
}

@media (prefers-color-scheme: dark) {
  .contact-card {
    border-left-color: var(--brand);
  }
}

.contact-card h3 {
  color: var(--brand-strong);
  margin-bottom: 10px;
}

@media (prefers-color-scheme: dark) {
  .contact-card h3 {
    color: var(--brand);
  }
}

.contact-card .button {
  margin-top: 6px;
}

.contact-card .hero-note {
  margin-top: 14px;
  margin-bottom: 0;
}

.contact-details {
  margin-top: 36px;
}

.contact-details h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}

.site-footer .copyright {
  margin: 0;
  max-width: none;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Policy page ---------- */

.policy {
  padding: 40px 0 56px;
}

.policy-inner {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(20px, 5vw, 40px);
  box-shadow: var(--shadow);
}

.policy-header {
  border-bottom: 2px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.policy h1 {
  color: var(--brand-strong);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

@media (prefers-color-scheme: dark) {
  .policy h1,
  .policy h2 {
    color: var(--brand);
  }
}

.policy .meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  max-width: none;
}

.policy h2 {
  color: var(--brand-strong);
  font-size: 1.3rem;
  margin-top: 36px;
  margin-bottom: 12px;
  border-left: 4px solid var(--border-strong);
  padding-left: 12px;
}

.policy h3 {
  font-size: 1.05rem;
  margin-top: 22px;
  margin-bottom: 8px;
}

.policy p,
.policy li {
  max-width: none;
}

.policy ul {
  padding-left: 22px;
  margin: 0 0 16px;
}

.policy li {
  margin-bottom: 8px;
}

.callout {
  background: var(--brand-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}

.callout-title {
  font-weight: 700;
  color: var(--brand-strong);
  margin-bottom: 6px;
}

@media (prefers-color-scheme: dark) {
  .callout-title {
    color: var(--brand);
  }
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
}

.policy table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.policy th,
.policy td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.95rem;
  vertical-align: top;
}

.policy th {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .policy th {
    color: var(--brand);
  }
}

code {
  background: var(--brand-soft);
  color: var(--brand-strong);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

@media (prefers-color-scheme: dark) {
  code {
    color: var(--brand-strong);
  }
}

.policy-footnote {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  max-width: none;
}

/* ---------- Early-access page & form ---------- */

.early-access-inner {
  max-width: 980px;
}

.early-access-layout {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  margin-top: 12px;
}

@media (min-width: 780px) {
  .early-access-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 380px);
    gap: 40px;
    align-items: start;
  }
}

.early-access-copy > p:first-child {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 18px;
}

/* Callout banner for the 3-month expiration */
.early-access-callout {
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand-strong);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0 24px;
}

@media (prefers-color-scheme: dark) {
  .early-access-callout {
    border-left-color: var(--brand);
  }
}

.early-access-callout-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: 6px;
}

@media (prefers-color-scheme: dark) {
  .early-access-callout-tag {
    color: var(--brand);
  }
}

.early-access-callout h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .early-access-callout h3 {
    color: var(--brand);
  }
}

.early-access-callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

/* Benefit points stacked vertically, full width */
.early-access-benefits {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.early-access-benefit-card {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.early-access-benefit-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .early-access-benefit-card h3 {
    color: var(--brand);
  }
}

.early-access-benefit-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.early-access-policy-link {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* Form Card */
.early-access-form-card {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
}

.early-access-form .field {
  margin-bottom: 20px;
}

.early-access-form label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.early-access-form .required {
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .early-access-form .required {
    color: var(--brand);
  }
}

/* Platform radio pills */
.platform-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.platform-option {
  position: relative;
  cursor: pointer;
  margin-bottom: 0 !important;
}

.platform-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.platform-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  min-height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.platform-option:hover .platform-pill {
  border-color: var(--brand-strong);
}

.platform-option input[type="radio"]:focus-visible + .platform-pill {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.platform-option input[type="radio"]:checked + .platform-pill {
  border-color: var(--brand-strong);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

@media (prefers-color-scheme: dark) {
  .platform-option:hover .platform-pill {
    border-color: var(--brand);
  }
  .platform-option input[type="radio"]:checked + .platform-pill {
    border-color: var(--brand);
    color: var(--brand);
  }
}

.early-access-form input[type="email"],
.early-access-form input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 1rem;
}

.early-access-form input[type="email"]:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.consent-field {
  margin-bottom: 22px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.45;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--brand-strong);
}

.early-access-form .button {
  width: 100%;
  text-align: center;
  border: 2px solid var(--brand-strong);
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 600;
  padding: 14px;
  min-height: 48px;
}

.early-access-collector {
  margin-top: 14px;
  font-size: 0.82rem;
  text-align: center;
}

/* Honeypot: present in the DOM for bots, invisible and unreachable for
   everyone else. Not display:none - some scrapers skip fields that are
   display:none or visibility:hidden, so this is pushed off-screen instead. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

