:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --paper: #fbfaf7;
  --ink: #1c1d1e;
  --ink-soft: rgba(28, 29, 30, .68);
  --muted: rgba(28, 29, 30, .48);
  --line: rgba(28, 29, 30, .14);
  --gold: #bd9960;
  --dark: #151515;
  --dark-2: #202020;
  --light: #f7f4ed;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

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

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

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

.site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.admin-shell {
  overflow: visible;
}

.hero-art {
  position: absolute;
  z-index: -3;
  inset: 0 0 auto;
  height: min(980px, 100svh);
  background-image: url("assets/alfric-hero.jpeg");
  background-size: cover;
  background-position: 62% 50%;
  filter: saturate(.78) contrast(.98) brightness(1.02);
}

.hero-veil {
  position: absolute;
  z-index: -2;
  inset: 0 0 auto;
  height: min(980px, 100svh);
  background:
    linear-gradient(90deg,
      rgba(244, 241, 235, 1) 0%,
      rgba(244, 241, 235, .98) 38%,
      rgba(244, 241, 235, .78) 55%,
      rgba(244, 241, 235, .18) 78%,
      rgba(244, 241, 235, 0) 100%),
    linear-gradient(180deg, transparent 72%, var(--bg) 100%);
  pointer-events: none;
}

.topbar,
.footer {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding-inline: clamp(22px, 5.4vw, 88px);
}

.topbar {
  position: sticky;
  top: 0;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: 18px;
  background: linear-gradient(180deg, rgba(244, 241, 235, .92), rgba(244, 241, 235, .68) 72%, transparent);
  backdrop-filter: blur(16px);
}

.page-index,
.mini-wordmark {
  width: fit-content;
  color: rgba(28,29,30,.82);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .32em;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  color: rgba(28,29,30,.58);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top-nav a {
  transition: color .2s ease;
}

.top-nav a:hover {
  color: var(--ink);
}

.top-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(28,29,30,.62);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.top-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(28,29,30,.06);
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 86px);
  padding: clamp(48px, 7vh, 92px) clamp(22px, 5.4vw, 88px) clamp(82px, 12vh, 140px);
}

.hero-copy {
  width: min(660px, 54vw);
  animation: reveal .9s var(--ease) both;
}

.eyebrow {
  margin-bottom: clamp(20px, 3vh, 32px);
  color: rgba(28,29,30,.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.wordmark {
  font-size: clamp(54px, 7.1vw, 112px);
  font-weight: 300;
  line-height: .86;
  letter-spacing: .2em;
  white-space: nowrap;
}

.tagline {
  max-width: 660px;
  margin-top: clamp(28px, 4vh, 44px);
  color: rgba(28,29,30,.8);
  font-size: clamp(31px, 4vw, 58px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0;
}

.description {
  max-width: 540px;
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.18vw, 18px);
  line-height: 1.72;
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(34px, 5vh, 58px);
}

.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: min(330px, 100%);
  min-height: 56px;
  padding: 16px 18px 16px 22px;
  border: 1px solid var(--ink);
  border-radius: 1px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .055em;
  text-align: left;
  transition: transform .35s var(--ease), box-shadow .35s ease;
}

.cta-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}

.cta-button span,
.cta-button svg {
  position: relative;
  z-index: 1;
}

.cta-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  transition: transform .35s var(--ease);
}

.cta-button:hover {
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(28,29,30,.13);
  transform: translateY(-2px);
}

.cta-button:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.cta-button:hover svg {
  transform: translateX(3px);
}

.cta-button.light {
  border-color: var(--light);
  background: var(--light);
  color: var(--ink);
}

.cta-button.light::before {
  background: var(--ink);
}

.cta-button.light:hover {
  color: #fff;
}

.cta-button:focus-visible,
.dialog-close:focus-visible,
.subscribe-form button:focus-visible,
.success-button:focus-visible,
.subscribe-form input:focus-visible,
.top-nav a:focus-visible,
.page-index:focus-visible {
  outline: 2px solid rgba(28,29,30,.9);
  outline-offset: 4px;
}

.privacy-note {
  max-width: 205px;
  color: rgba(28,29,30,.44);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: .02em;
}

.section {
  padding: clamp(92px, 12vw, 160px) clamp(22px, 5.4vw, 88px) 0;
}

.section-copy {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(280px, 560px);
  align-items: end;
  justify-content: space-between;
  gap: 56px;
  margin-bottom: clamp(36px, 5vw, 68px);
}

.section-copy.compact {
  display: block;
  max-width: 820px;
}

.section h2,
.final-cta h2 {
  color: var(--ink);
  font-size: clamp(38px, 5.7vw, 82px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
}

.section-copy p:not(.eyebrow),
.final-cta p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.72;
}

.demo-section {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(260px, 420px);
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 7vw, 112px);
  margin-top: 0;
  padding-top: clamp(84px, 10vw, 132px);
  padding-bottom: clamp(84px, 10vw, 132px);
  background:
    radial-gradient(circle at 78% 20%, rgba(189,153,96,.18), transparent 34%),
    linear-gradient(180deg, #eee8dc 0%, #f4f1eb 100%);
  color: var(--ink);
}

.demo-section .section-copy {
  display: block;
  margin-bottom: 0;
}

.demo-section .eyebrow,
.demo-section .section-copy p:not(.eyebrow) {
  color: var(--ink-soft);
}

.demo-section h2 {
  color: var(--ink);
}

.demo-section .section-copy p:not(.eyebrow) {
  margin-top: 26px;
}

.video-frame {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(360px, 100%);
  padding: 8px;
  border: 1px solid rgba(28,29,30,.12);
  border-radius: 8px;
  background: rgba(251,250,247,.52);
  box-shadow: 0 28px 70px rgba(28,29,30,.16);
}

.video-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12% -18% 10%;
  border-radius: 999px;
  background: rgba(189,153,96,.18);
  filter: blur(34px);
}

.video-frame video {
  width: 100%;
  aspect-ratio: 720 / 1554;
  max-height: min(72svh, 720px);
  border-radius: 6px;
  background: transparent;
  object-fit: cover;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.feature-grid article {
  display: grid;
  grid-template-columns: 88px minmax(220px, 360px) minmax(280px, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
  padding: clamp(26px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.feature-grid span {
  color: rgba(28,29,30,.36);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

.feature-grid h3 {
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 350;
  line-height: 1.12;
}

.feature-grid p {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.68;
}

.final-cta {
  margin: 0;
  padding: clamp(72px, 10vw, 120px) clamp(22px, 5.4vw, 88px);
  background: var(--ink);
  color: var(--light);
}

.final-cta .eyebrow,
.final-cta p {
  color: rgba(247,244,237,.64);
}

.final-cta p:not(.eyebrow) {
  max-width: 640px;
  margin-top: 26px;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.72;
}

.final-cta .cta-button {
  margin-top: 38px;
}

.license-panel {
  margin: clamp(72px, 10vw, 130px) clamp(22px, 5.4vw, 88px) 0;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid var(--line);
  background: rgba(251, 250, 247, .82);
}

.license-panel.standalone {
  margin-top: clamp(72px, 10vw, 120px);
  margin-bottom: clamp(48px, 8vw, 90px);
}

.license-panel h1 {
  color: var(--ink);
  font-size: clamp(34px, 5.1vw, 72px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: 0;
}

.license-panel code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .9em;
}

.license-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.license-form label {
  display: grid;
  gap: 8px;
  color: rgba(28,29,30,.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.license-form input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.license-form input:focus {
  border-color: rgba(28,29,30,.55);
}

.license-form .cta-button {
  min-width: 210px;
}

.license-result {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.license-result > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(28,29,30,.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.license-result button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.license-result pre {
  margin: 0 0 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.74);
  padding: 16px;
  color: var(--ink);
  font: 12px/1.7 "SFMono-Regular", Consolas, monospace;
}

.license-error {
  min-height: 20px;
  margin-top: 16px;
  color: #8c352d;
  font-size: 12px;
}

.footer {
  padding-top: 42px;
  padding-bottom: max(34px, env(safe-area-inset-bottom));
  color: rgba(28,29,30,.42);
  font-size: 9px;
  letter-spacing: .015em;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 19px;
}

.divider {
  width: 1px;
  height: 13px;
  background: rgba(28,29,30,.14);
}

.copyright {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

.footer-links {
  justify-self: center;
  font-size: 12px;
  letter-spacing: 0;
}

.footer-links a {
  color: rgba(28,29,30,.6);
  text-decoration: none;
  transition: color .2s var(--ease);
}

.footer-links a:hover {
  color: var(--gold);
}

.subscribe-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.subscribe-dialog::backdrop {
  background: rgba(32, 32, 31, .32);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .35s ease;
}

.subscribe-dialog[open]::backdrop {
  opacity: 1;
}

.dialog-panel {
  position: relative;
  min-height: 400px;
  padding: 58px 54px 50px;
  background: rgba(248, 247, 244, .96);
  box-shadow: 0 28px 90px rgba(20,20,20,.22);
  transform: translateY(20px) scale(.98);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .35s ease;
}

.subscribe-dialog[open] .dialog-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.dialog-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(28,29,30,.55);
  cursor: pointer;
  transition: color .2s ease, transform .3s var(--ease);
}

.dialog-close:hover {
  color: var(--ink);
  transform: rotate(4deg);
}

.dialog-close svg {
  width: 20px;
  height: 20px;
}

.dialog-kicker {
  margin-bottom: 24px;
  color: rgba(28,29,30,.46);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .19em;
}

.dialog-panel h2 {
  max-width: 380px;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0;
}

.dialog-text {
  max-width: 360px;
  margin-top: 21px;
  color: rgba(28,29,30,.52);
  font-size: 13px;
  line-height: 1.65;
}

.website-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.subscribe-form {
  margin-top: 36px;
}

.subscribe-form label {
  display: block;
  margin-bottom: 10px;
  color: rgba(28,29,30,.58);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  min-height: 54px;
  border-bottom: 1px solid rgba(28,29,30,.34);
  transition: border-color .2s ease;
}

.input-row:focus-within {
  border-color: var(--ink);
}

.subscribe-form input {
  min-width: 0;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 300;
}

.subscribe-form input::placeholder {
  color: rgba(28,29,30,.28);
}

.subscribe-form input[aria-invalid="true"] {
  color: #8c352d;
}

.subscribe-form button {
  display: grid;
  place-items: center;
  align-self: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: transform .3s var(--ease), background-color .2s ease, color .2s ease;
}

.subscribe-form button:hover {
  background: transparent;
  color: var(--ink);
  transform: translateX(2px);
}

.subscribe-form button svg {
  width: 19px;
  height: 19px;
}

.field-error {
  min-height: 17px;
  margin-top: 8px;
  color: #8c352d;
  font-size: 10px;
}

.form-legal {
  margin-top: 15px;
  color: rgba(28,29,30,.34);
  font-size: 9px;
  line-height: 1.5;
}

.success-state {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.success-button {
  margin-top: 31px;
  padding: 14px 19px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .04em;
  transition: background-color .25s ease, color .25s ease;
}

.success-button:hover {
  background: var(--ink);
  color: #fff;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .wordmark {
    font-size: clamp(44px, 7vw, 76px);
    letter-spacing: .16em;
  }

  .demo-section,
  .section-copy {
    grid-template-columns: 1fr;
  }

  .feature-grid article {
    grid-template-columns: 64px minmax(220px, 340px) minmax(260px, 1fr);
  }
}

@media (max-width: 760px) {
  .hero-art {
    position: relative;
    z-index: 0;
    height: clamp(280px, 45svh, 420px);
    background-image: url("assets/alfric-hero-mobile.jpeg");
    background-position: 50% 52%;
    transform: none;
  }

  .hero-art::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 30%;
    background: linear-gradient(180deg, transparent, var(--bg));
  }

  .hero-veil {
    display: none;
  }

  .topbar {
    position: absolute;
    top: 0;
    left: 0;
    grid-template-columns: 1fr auto;
    padding-inline: 22px;
    padding-top: max(22px, env(safe-area-inset-top));
    background: transparent;
    backdrop-filter: none;
  }

  .top-nav {
    display: none;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 22px 22px 58px;
  }

  .hero-copy {
    width: 100%;
  }

  .wordmark {
    font-size: clamp(40px, 14vw, 62px);
    letter-spacing: .12em;
  }

  .tagline {
    margin-top: 22px;
    font-size: clamp(30px, 10vw, 46px);
  }

  .description {
    font-size: 14px;
    line-height: 1.65;
  }

  .cta-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .privacy-note {
    max-width: none;
  }

  .section,
  .demo-section {
    padding: 74px 22px 0;
  }

  .demo-section {
    padding-bottom: 74px;
  }

  .video-frame {
    width: min(320px, 86vw);
    padding: 6px;
  }

  .video-frame::before {
    inset: 10% -10% 12%;
    filter: blur(24px);
  }

  .section h2,
  .final-cta h2,
  .license-panel h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .feature-grid article {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .final-cta {
    padding: 58px 22px;
  }

  .license-panel {
    margin: 72px 22px 0;
    padding: 28px 20px;
  }

  .license-form {
    grid-template-columns: 1fr;
  }

  .license-form .cta-button {
    min-width: 0;
  }

  .footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-inline: 22px;
  }

  .footer-brand {
    flex-wrap: wrap;
    gap: 10px;
  }

  .dialog-panel {
    min-height: 360px;
    padding: 48px 28px 36px;
  }
}
