:root {
  color-scheme: light;
  --bg-color: #f7f5ef;
  --text-color: #242321;
  --text-muted: #686661;
  --border-color: #dedbd2;
  --nav-bg: rgba(247, 245, 239, .91);
  --accent: #5559ca;
  --accent-soft: #e6e5f9;
  --card-bg: #fffefa;
  --font-body: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

.dark-theme {
  color-scheme: dark;
  --bg-color: #181c24;
  --text-color: #f5f3ee;
  --text-muted: #b4b7c0;
  --border-color: #343b48;
  --nav-bg: rgba(24, 28, 36, .93);
  --accent: #c1baff;
  --accent-soft: #303550;
  --card-bg: #262b35;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-color); color: var(--text-color); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a:focus-visible { outline-offset: 4px; }
img { display: block; max-width: 100%; }
em, .serif-italic { font-family: var(--font-serif); font-weight: 400; font-style: italic; }

/* Navigation */
.site-header { position: sticky; top: 0; z-index: 50; height: 76px; background: var(--nav-bg); border-bottom: 1px solid var(--border-color); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.header-container { height: 100%; max-width: 1480px; margin: auto; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 11px rgba(26,28,54,.12); }
.brand-period, .footer-brand span { color: var(--accent); }
.nav-actions, nav { display: flex; align-items: center; }
.nav-actions { gap: 22px; }
nav { gap: 32px; }
nav a { font-size: 13px; font-weight: 700; color: var(--text-muted); transition: color .2s; }
nav a:hover, nav a.active { color: var(--text-color); }
.theme-toggle-btn { width: 36px; height: 36px; padding: 8px; display: grid; place-items: center; border: 1px solid var(--border-color); border-radius: 50%; background: transparent; color: var(--text-color); cursor: pointer; transition: background .2s, transform .2s; }
.theme-toggle-btn:hover { background: var(--accent-soft); transform: rotate(12deg); }
.theme-toggle-btn svg { width: 18px; height: 18px; }
.theme-toggle-btn .sun-icon { display: none; }
.dark-theme .theme-toggle-btn .sun-icon { display: block; }
.dark-theme .theme-toggle-btn .moon-icon { display: none; }

/* Hero */
.hero { max-width: 1480px; margin: 0 auto; padding: 46px 42px 72px; min-height: 690px; display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: stretch; gap: 44px; }
.hero-copy { padding: 32px 0 26px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
.award-pill { display: block; width: min(100%, 322px); padding: 8px; margin-bottom: 18px; color: #65582e; transition: transform .2s; }
.award-pill:hover { transform: translateY(-2px); }
/* Fit the mask to the artwork bounds, excluding the source image’s transparent margins. */
.award-image { display: block; width: 100%; aspect-ratio: 1650 / 473; background-color: currentColor; -webkit-mask: url("assets/swift-student-challenge-winner.png") 47.9452% 52.0833% / 117.697% 171.036% no-repeat; mask: url("assets/swift-student-challenge-winner.png") 47.9452% 52.0833% / 117.697% 171.036% no-repeat; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .2em; }
.hero h1 { max-width: 660px; margin: 15px 0 21px; font-size: clamp(57px, 5.55vw, 88px); line-height: .99; letter-spacing: -.075em; font-weight: 800; }
.hero h1 em { color: var(--accent); letter-spacing: -.075em; }
.lead { max-width: 490px; margin: 0; font-size: clamp(16px, 1.28vw, 19px); line-height: 1.64; color: var(--text-muted); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 23px; margin-top: 34px; }
.button { min-height: 51px; display: inline-flex; align-items: center; justify-content: center; gap: 28px; padding: 12px 19px 12px 22px; border: 1px solid var(--text-color); border-radius: 999px; font-size: 13px; font-weight: 800; transition: transform .2s, background .2s, box-shadow .2s; }
.button:hover { transform: translateY(-3px); box-shadow: 0 10px 23px rgba(0,0,0,.11); }
.app-store-badge { display: inline-flex; flex-shrink: 0; border-radius: 8px; transition: transform .2s; }
.app-store-badge img { width: auto; height: 40px; }
.app-store-badge:hover { transform: translateY(-2px); }
.button.primary { background: var(--text-color); color: var(--bg-color); }
.button-link { display: inline-flex; gap: 9px; align-items: center; font-size: 13px; font-weight: 800; border-bottom: 1px solid var(--text-color); padding-bottom: 4px; }
.button-link:hover { color: var(--accent); border-color: var(--accent); }
.hero-art { min-height: 580px; position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; border-radius: 31px; background: radial-gradient(circle at 71% 33%, #ffebd4 0 18%, transparent 49%), linear-gradient(133deg, #dcdafa 0%, #e8e3f5 42%, #f8e3d9 100%); }
.hero-art::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .46; background-image: radial-gradient(#aaa4cf 1.2px, transparent 1.2px); background-size: 27px 27px; mask-image: linear-gradient(125deg, transparent 30%, black); }
.hero-art-orbit { position: absolute; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; }
.orbit-one { width: 680px; aspect-ratio: 1; top: -290px; right: -230px; }.orbit-two { width: 420px; aspect-ratio: 1; bottom: -275px; left: -70px; }
.product-screenshot { position: relative; z-index: 2; width: 86%; max-width: none; transform: rotate(-2deg) translateY(12px); filter: drop-shadow(0 30px 22px rgba(51, 49, 80, .22)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.hero-art:hover .product-screenshot { transform: rotate(-1deg) translateY(9px); }
.hero-art-label { position: absolute; z-index: 3; top: 29px; left: 34px; color: #504b72; font-size: 10px; font-weight: 900; letter-spacing: .2em; }

/* Editorial divider */
.ticker { overflow: hidden; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); background: #e9e8fa; color: #4646a0; }
.ticker-inner { min-width: max-content; max-width: 1480px; margin: auto; min-height: 61px; display: flex; align-items: center; justify-content: space-around; gap: 60px; padding: 0 42px; font-size: 11px; font-weight: 900; letter-spacing: .19em; }
.ticker b { font-size: 22px; font-weight: 400; }

/* Feature gallery */
.showcase-section { max-width: 1480px; margin: auto; padding: 119px 42px 128px; scroll-margin-top: 90px; }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 50px; }
.section-tag { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .19em; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.section-intro h2 { margin: 15px 0 0; font-size: clamp(42px, 4.4vw, 69px); line-height: 1.06; letter-spacing: -.065em; font-weight: 800; }
.section-intro h2 em { color: var(--accent); }
.section-intro > p { max-width: 265px; margin: 0 0 7px; color: var(--text-muted); font-size: 15px; line-height: 1.6; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
.showcase-card { min-width: 0; padding: 25px 27px 31px; overflow: hidden; border-radius: 25px; color: #25252a; }
.card-coral { background: #f7ded5; }.card-yellow { background: #f4ebce; }.card-blue { background: #dbe9ed; }.card-lilac { background: #e7e0ef; }
.showcase-heading { display: flex; align-items: center; justify-content: space-between; }
.card-index { font-size: 11px; font-weight: 900; letter-spacing: .17em; }
.showcase-image { height: clamp(245px, 30vw, 425px); display: grid; place-items: center; margin: 8px -10px 15px; }
.showcase-image img { width: min(100%, 600px); height: auto; max-height: 100%; object-fit: contain; filter: drop-shadow(0 18px 15px rgba(42,43,52,.16)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.showcase-card:hover .showcase-image img { transform: translateY(-7px) rotate(-1deg); }
.showcase-info { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding-top: 21px; border-top: 1px solid rgba(39,39,42,.19); }
.showcase-info h3 { max-width: 235px; margin: 0; font-size: clamp(23px, 2vw, 30px); line-height: 1.05; letter-spacing: -.05em; }
.showcase-info p { max-width: 245px; margin: 0; font-size: 13px; line-height: 1.55; color: #535057; }

/* Closing and footer */
.closing-panel { position: relative; overflow: hidden; margin: 0 42px 48px; padding: 100px 24px 106px; border-radius: 28px; background: #272a64; color: #fff; text-align: center; }
.closing-panel::before, .closing-panel::after { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; pointer-events: none; }
.closing-panel::before { left: -160px; bottom: -185px; }.closing-panel::after { right: -150px; top: -170px; }
.closing-mark { margin-bottom: 20px; color: #ffb493; font-size: 35px; line-height: 1; }
.closing-panel .eyebrow { color: #d0cef8; }
.closing-panel h2 { margin: 17px 0 17px; font-size: clamp(43px, 5.4vw, 78px); font-weight: 800; line-height: 1.07; letter-spacing: -.066em; }
.closing-panel h2 em { color: #ffbaa2; }
.closing-panel > p:not(.eyebrow) { margin: 0 auto 27px; color: #d1d1e3; font-size: 15px; }
.light-button { position: relative; z-index: 2; border-color: #fff; background: #fff; color: #292b66; }
.site-footer { max-width: 1480px; margin: auto; padding: 20px 42px 47px; display: flex; align-items: center; justify-content: space-between; gap: 25px; color: var(--text-muted); font-size: 11px; }
.footer-brand { color: var(--text-color); font-size: 18px; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; font-weight: 800; }
.footer-nav a:hover { color: var(--accent); }

/* Support and privacy pages */
.page { max-width: 1020px; min-height: calc(100vh - 190px); margin: auto; padding: 94px 42px 100px; }
.page-hero { padding: 53px 40px 56px; margin-bottom: 55px; border-radius: 26px; background: var(--accent-soft); text-align: center; }
.page-hero .eyebrow { display: block; margin-bottom: 17px; }
.page-hero h1 { margin: 0 0 14px; font-size: clamp(42px, 6vw, 72px); line-height: 1.06; letter-spacing: -.065em; }
.page-hero h1 em, .page-hero .serif-italic { color: var(--accent); }
.page-hero .lead { max-width: 620px; margin: auto; font-size: 17px; }
.page-content { max-width: 750px; margin: auto; }
.page-content section { padding-bottom: 29px; margin-bottom: 31px; border-bottom: 1px solid var(--border-color); }
.page-content section:last-child { border-bottom: 0; }
.page-content h2 { margin: 0 0 18px; font-size: 26px; letter-spacing: -.045em; }
.page-content p, .page-content li { color: var(--text-muted); font-size: 15px; line-height: 1.8; }
.page-content p strong { color: var(--text-color); }
.page-content a:not(.button) { color: var(--accent); text-decoration: underline; }
.page-content .button { color: var(--bg-color); }

.dark-theme .award-pill { color: #e9d59b; }
.dark-theme .ticker { background: #282944; color: #c8c9ff; }
.dark-theme .hero-art { background: radial-gradient(circle at 70% 30%, #665b73 0 18%, transparent 49%), linear-gradient(133deg, #373e66, #51415b); }
.dark-theme .hero-art-label { color: #eee7ff; }
.dark-theme .card-coral { background: linear-gradient(145deg, #393039, #2b2d37); }
.dark-theme .card-yellow { background: linear-gradient(145deg, #3b392f, #2e3035); }
.dark-theme .card-blue { background: linear-gradient(145deg, #2d3c45, #292f3b); }
.dark-theme .card-lilac { background: linear-gradient(145deg, #383447, #2c2d3b); }
.dark-theme .showcase-card { color: #f5f3ee; border: 1px solid rgba(255,255,255,.12); }
.dark-theme .showcase-image img { filter: drop-shadow(0 20px 20px rgba(0,0,0,.38)) drop-shadow(0 0 1px rgba(255,255,255,.3)); }
.dark-theme .showcase-info { border-top-color: rgba(255,255,255,.19); }
.dark-theme .showcase-info p { color: #c5c6d0; }
.dark-theme .card-coral .card-index { color: #ffb5a7; }
.dark-theme .card-yellow .card-index { color: #f2d68e; }
.dark-theme .card-blue .card-index { color: #9ed4e2; }
.dark-theme .card-lilac .card-index { color: #d1b7f5; }
.dark-theme .closing-panel { background: #373d8b; }

@media (max-width: 1050px) {
  .hero { gap: 22px; min-height: 600px; }
  .hero-art { min-height: 480px; }
  .hero h1 { font-size: clamp(51px, 5.8vw, 70px); }
  .showcase-info { display: block; }
  .showcase-info p { max-width: 330px; margin-top: 10px; }
}
@media (max-width: 760px) {
  .site-header { height: 66px; }
  .header-container { padding: 0 22px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 54px 22px 65px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(55px, 10vw, 76px); }
  .hero-art { min-height: 0; aspect-ratio: 1.22; }
  .showcase-section { padding: 87px 22px 94px; }
  .section-intro { display: block; margin-bottom: 38px; }
  .section-intro > p { margin-top: 21px; }
  .showcase-grid { gap: 17px; }
  .showcase-card { padding: 17px 16px 23px; }
  .showcase-image { height: clamp(160px, 29vw, 260px); }
  .closing-panel { margin: 0 22px 30px; }
  .site-footer { padding: 16px 22px 35px; }
}
@media (max-width: 600px) {
  .brand { font-size: 16px; gap: 8px; }.brand-icon { width: 29px; height: 29px; }
  nav { gap: 16px; } nav a { font-size: 11px; } nav a:last-child { display: none; }
  .nav-actions { gap: 11px; }.theme-toggle-btn { width: 32px; height: 32px; }
  .award-pill { margin-bottom: 18px; width: min(100%, 288px); }
  .hero h1 { font-size: clamp(51px, 12vw, 68px); }
  .hero-art { aspect-ratio: 1.16; border-radius: 20px; }
  .hero-art-label { top: 20px; left: 20px; font-size: 8px; }
  .ticker-inner { min-height: 52px; gap: 30px; font-size: 9px; }
  .section-intro h2 { font-size: clamp(40px, 10vw, 54px); }
  .showcase-grid { grid-template-columns: 1fr; gap: 18px; }
  .showcase-card { padding: 21px 21px 26px; border-radius: 22px; }
  .showcase-image { height: clamp(210px, 63vw, 390px); }
  .showcase-info { display: flex; align-items: start; }
  .showcase-info h3 { font-size: 23px; }.showcase-info p { max-width: 190px; margin: 0; font-size: 11px; }
  .closing-panel { padding: 80px 24px; border-radius: 20px; }
  .closing-panel h2 { font-size: clamp(40px, 10vw, 58px); }
  .site-footer { align-items: start; flex-direction: column; gap: 14px; }
  .page { padding: 55px 22px 75px; }
  .page-hero { padding: 45px 20px; margin-bottom: 40px; }
}
@media (max-width: 380px) {
  .header-container { padding: 0 14px; } nav { gap: 10px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 47px; }
  .showcase-info { display: block; }.showcase-info p { max-width: none; margin-top: 9px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
