/* ============================================================
   Orvaly - styles.css
   Design system: DESIGN.md | Build: CC-01R v2
   ============================================================ */

:root {
  --surface-primary: #191c1f;
  --surface-card: #1e2126;
  --surface-raised: #2a2d31;
  --border-subtle: #2a2d31;
  --border-strong: #3a3d41;
  --text-primary: #ffffff;
  --text-secondary: #8d969e;
  --text-muted: #505a63;
  --accent: #494fdf;
  --accent-hover: #5b60e8;
  --radius-card: 16px;
  --radius-input: 12px;
  --radius-pill: 9999px;
  --container-width: 1180px;
  --header-height: 72px;
  --header-offset: calc(var(--header-height) + 20px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(73, 79, 223, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(73, 79, 223, 0.08), transparent 24%),
    var(--surface-primary);
  color: var(--text-secondary);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.1px;
  -webkit-font-smoothing: antialiased;
}

body,
h1,
h2,
h3,
p,
ul {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
summary {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(100% - 32px, var(--container-width));
  margin: 0 auto;
}

main#top,
section[id] {
  scroll-margin-top: var(--header-offset);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(25, 28, 31, 0.92);
  border-bottom: 1px solid rgba(42, 45, 49, 0.8);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
}

.brandmark {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text-primary);
}

.hero,
.section-shell,
.story-section,
.journey-section,
.contact-section,
.privacy-page {
  padding: 72px 0;
}

.section-panel {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(30, 33, 38, 0.72);
}

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.05rem, 4.9vw, 4rem);
  line-height: 1.08;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.5rem);
  line-height: 1.15;
}

h3 {
  font-size: 1rem;
  line-height: 1.35;
}

p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.hero-support {
  margin-top: 20px;
  max-width: 50ch;
  color: #c8d0d7;
}

.hero-title-line {
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    filter 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-primary);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.hero-visual-card,
.contact-card,
.story-card,
.benefit-card,
.journey-card,
.privacy-shell {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
}

.hero-visual-card {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 16px;
}

.hero-visual {
  width: 100%;
  height: auto;
}

.visual-core {
  fill: rgba(42, 45, 49, 0.92);
  stroke: rgba(73, 79, 223, 0.65);
  stroke-width: 2;
}

.visual-core-line {
  fill: url(#signal);
}

.visual-core-line-muted {
  opacity: 0.7;
}

.visual-link {
  fill: none;
  stroke: rgba(73, 79, 223, 0.38);
  stroke-linecap: round;
  stroke-width: 2.5;
}

.visual-node rect:first-child {
  fill: rgba(30, 33, 38, 0.95);
  stroke: rgba(58, 61, 65, 0.95);
  stroke-width: 1.5;
}

.visual-node-line {
  fill: rgba(255, 255, 255, 0.84);
}

.visual-node-line-muted {
  fill: rgba(141, 150, 158, 0.65);
}

.visual-node-small rect:first-child {
  fill: rgba(30, 33, 38, 0.88);
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 32px;
  max-width: 64ch;
}

.section-heading.narrow {
  max-width: 58ch;
}

.story-grid,
.benefit-grid,
.journey-grid,
.outcome-grid {
  display: grid;
  gap: 16px;
}

.story-card {
  overflow: hidden;
}

.story-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.story-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.story-card summary::-webkit-details-marker {
  display: none;
}

.story-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(73, 79, 223, 0.12);
  border: 1px solid rgba(73, 79, 223, 0.22);
}

.story-card-icon svg {
  width: 22px;
  height: 22px;
}

.story-card-icon path,
.story-card-icon line,
.story-card-icon circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.story-card-icon .icon-dot {
  fill: rgba(255, 255, 255, 0.86);
  stroke: none;
}

.story-card-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.story-card-toggle {
  position: relative;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}

.story-card-toggle::before,
.story-card-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  background: var(--text-primary);
  transform: translate(-50%, -50%);
}

.story-card-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.15s ease;
}

.story-card[open] .story-card-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.story-card-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-subtle);
}

.story-card-content p + p {
  margin-top: 12px;
}

.story-card-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.benefit-card,
.journey-card,
.outcome-card {
  padding: 22px 20px;
}

.benefit-card p,
.journey-card p {
  margin-top: 10px;
}

.benefit-grid-top {
  margin-bottom: 8px;
}

.outcome-connector {
  display: flex;
  justify-content: center;
  margin: 12px 0 18px;
}

.outcome-connector-triangle {
  display: block;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 22px solid rgba(73, 79, 223, 0.7);
}

.outcome-card {
  display: flex;
  align-items: center;
  min-height: 96px;
}

.outcome-card h3 {
  max-width: 14ch;
}

.journey-grid {
  position: relative;
}

.journey-card {
  display: grid;
  gap: 6px;
}

.journey-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 42px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(73, 79, 223, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.contact-card {
  padding: 28px;
  display: grid;
  gap: 14px;
  max-width: 760px;
  justify-items: start;
}

.contact-note,
.privacy-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--border-subtle);
}

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

.site-footer p,
.site-footer a {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.site-footer a:hover {
  color: var(--text-secondary);
}

.privacy-shell {
  padding: 28px;
  max-width: 760px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}

.privacy-shell h1 {
  max-width: none;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.privacy-shell h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1rem;
}

.privacy-shell p + p {
  margin-top: 12px;
}

.inline-link {
  color: var(--accent);
}

.inline-link:hover {
  color: var(--accent-hover);
}

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

@media (min-width: 980px) {
  .hero,
  .section-shell,
  .story-section,
  .journey-section,
  .contact-section,
  .privacy-page {
    padding: 96px 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
    gap: 40px;
  }

  .hero-visual-card {
    justify-self: end;
    margin: 0;
  }

  .benefit-grid-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .outcome-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .journey-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .journey-grid::before {
    content: "";
    position: absolute;
    top: 36px;
    left: 12%;
    right: 12%;
    border-top: 1px solid rgba(73, 79, 223, 0.26);
    z-index: 0;
  }

  .journey-card {
    position: relative;
    z-index: 1;
  }
}

@media (max-width: 639px) {
  :root {
    --header-height: 64px;
    --header-offset: calc(var(--header-height) + 18px);
  }

  .topbar {
    gap: 12px;
  }

  .site-nav {
    gap: 14px;
  }

  .hero,
  .section-shell,
  .story-section,
  .journey-section,
  .contact-section,
  .privacy-page {
    padding: 56px 0;
  }

  .hero-visual-card,
  .contact-card,
  .privacy-shell {
    padding: 20px;
  }

  .hero-copy {
    max-width: none;
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
    line-height: 1.1;
  }

  .hero-support {
    margin-top: 18px;
    max-width: 44ch;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-visual-card {
    width: min(100%, 360px);
    padding: 14px;
  }

  .story-card summary,
  .story-card-content,
  .benefit-card,
  .journey-card,
  .outcome-card {
    padding-left: 16px;
    padding-right: 16px;
  }

  .story-card-header {
    gap: 12px;
  }

  .story-card-icon {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
