@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/playfair-display-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  --color-brand-red: #d04c4c;
  --color-brand-red-dark: #b83f3f;
  --color-brand-red-deep: #8f3333;
  --color-navy: #2a2438;
  --color-navy-deep: #16121f;
  --color-navy-light: #3d3548;
  --color-ink: #1a1624;
  --color-gold: #c9a227;
  --color-gold-light: #e8c547;
  --color-teal: #6fc4b8;
  --color-cream: #f4f0ea;
  --color-white: #ffffff;
  --color-text: #ebe6f0;
  --color-text-muted: #a89cb4;
  --color-border: rgba(255, 255, 255, 0.12);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --container: 1120px;
  --header-h: 4.25rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-gold-light);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--color-gold-light);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--color-white);
  color: var(--color-navy);
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

/* —— Header —— */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(22, 18, 31, 0.92);
}

.site-header__brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.site-header__brand:hover {
  color: var(--color-white);
}

.site-header__mark {
  color: inherit;
}

.site-header__tld {
  color: var(--color-brand-red);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.75rem);
}

.site-header__nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.site-header__nav a:hover {
  color: var(--color-white);
}

.site-header__github {
  color: var(--color-white) !important;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}

.site-header__github:hover {
  border-color: var(--color-teal);
  color: var(--color-teal) !important;
}

@media (max-width: 640px) {
  .site-header__nav a:not(.site-header__github) {
    display: none;
  }
}

/* —— Buttons —— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease-out), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-brand-red);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-brand-red-dark);
  color: var(--color-white);
}

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

.btn--ghost:hover {
  border-color: var(--color-teal);
  color: var(--color-white);
}

/* —— Hero —— */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 36rem) minmax(0, 34rem);
  justify-content: center;
  align-items: center;
  gap: clamp(1.75rem, 3.5vw, 3rem);
  padding:
    calc(var(--header-h) + 1.5rem)
    clamp(1.25rem, 4vw, 2.5rem)
    2.75rem;
  overflow: clip;
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(208, 76, 76, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 30%, rgba(111, 196, 184, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(201, 162, 39, 0.08), transparent 45%),
    linear-gradient(165deg, var(--color-ink) 0%, var(--color-navy-deep) 48%, #221c30 100%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite alternate;
}

.hero__glow--teal {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  right: 8%;
  top: 18%;
  background: rgba(111, 196, 184, 0.35);
}

.hero__glow--red {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  left: 5%;
  bottom: 12%;
  background: rgba(208, 76, 76, 0.28);
  animation-delay: -5s;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.7;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, -24px, 0) scale(1.08); }
}

.hero__content,
.hero__visual {
  position: relative;
  z-index: 1;
}


.hero__maker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.55rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 1.1rem;
}

.hero__maker-brand {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-white);
  line-height: 1;
}

.hero__product {
  margin-bottom: 1.35rem;
}

.hero__logo {
  width: min(100%, 300px);
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.35));
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--color-white);
  max-width: 18ch;
  margin-bottom: 1rem;
}

.hero__lede {
  max-width: 38ch;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Studio mock */

.hero__visual {
  width: 100%;
}

.studio-mock {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(42, 36, 56, 0.72);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  width: 100%;
  animation: mock-settle 1.1s var(--ease-out) both;
}

@keyframes mock-settle {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.studio-mock__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  background: var(--color-brand-red);
}

.studio-mock__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.studio-mock__title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.studio-mock__body {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  min-height: 280px;
}

.studio-mock__preview {
  padding: 1rem;
  background: #1f1a29;
  border-right: 1px solid var(--color-border);
}

.studio-mock__page {
  height: 100%;
  min-height: 240px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7f3ee, #efe8e0);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.studio-mock__bar {
  height: 0.45rem;
  width: 28%;
  border-radius: 999px;
  background: #c9a227;
}

.studio-mock__hero-block {
  flex: 1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(208, 76, 76, 0.85), rgba(42, 36, 56, 0.9)),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.05) 10px,
      rgba(255, 255, 255, 0.05) 11px
    );
  position: relative;
  overflow: hidden;
}

.studio-mock__hero-block::after {
  content: "";
  position: absolute;
  width: 4.5rem;
  height: 4.5rem;
  right: 12%;
  top: 18%;
  border-radius: 1rem;
  background: rgba(111, 196, 184, 0.55);
  filter: blur(0.5px);
  animation: splash 3.5s ease-in-out infinite;
}

@keyframes splash {
  0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  50% { transform: scale(1.12) translate(-4px, -6px); opacity: 1; }
}

.studio-mock__lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.studio-mock__lines span {
  display: block;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(42, 36, 56, 0.18);
}

.studio-mock__lines span:nth-child(1) { width: 88%; }
.studio-mock__lines span:nth-child(2) { width: 72%; }
.studio-mock__lines span:nth-child(3) { width: 54%; }

.studio-mock__panel {
  padding: 0.85rem;
  background: rgba(26, 22, 36, 0.9);
}

.studio-mock__tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.studio-mock__tabs span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}

.studio-mock__tabs .is-active {
  background: rgba(208, 76, 76, 0.2);
  color: var(--color-white);
}

.studio-mock__outline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.studio-mock__outline li {
  font-size: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.studio-mock__outline .is-active {
  border-color: rgba(111, 196, 184, 0.45);
  color: var(--color-white);
  background: rgba(111, 196, 184, 0.1);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-h) + 1.5rem);
    min-height: auto;
  }

  .hero__visual {
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
    justify-self: center;
  }

  .studio-mock {
    transform: none;
    animation: mock-settle-flat 1s var(--ease-out) both;
  }

  @keyframes mock-settle-flat {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero__headline {
    max-width: 22ch;
  }
}

@media (max-width: 560px) {
  .studio-mock__body {
    grid-template-columns: 1fr;
  }

  .studio-mock__preview {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .studio-mock__page {
    min-height: 180px;
  }
}

/* —— Sections —— */

.section {
  position: relative;
  padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section__inner {
  width: min(var(--container), 100%);
  margin-inline: auto;
}

.section__inner--split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.section__inner--center {
  text-align: center;
  max-width: 40rem;
}

.section__inner--center .hero__actions {
  justify-content: center;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.85rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: 1rem;
}

.section__copy {
  max-width: 38rem;
}

.section__copy p {
  color: var(--color-text-muted);
}

.section__copy p + p {
  margin-top: 1rem;
}

.section__emphasis {
  color: var(--color-text) !important;
  font-weight: 600;
}

/* Drop-in */

.section--dropin {
  background:
    linear-gradient(180deg, transparent, rgba(208, 76, 76, 0.05)),
    var(--color-navy-deep);
}

.section--dropin .section__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.section--dropin .section__copy {
  grid-column: 1 / -1;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.steps__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.steps__num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-brand-red);
  line-height: 1.2;
}

.steps h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.25rem;
}

.steps p {
  color: var(--color-text-muted);
  font-size: 0.975rem;
}

.tree {
  margin: 0;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.28);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.tree code {
  color: inherit;
}

@media (max-width: 800px) {
  .section--dropin .section__inner {
    grid-template-columns: 1fr;
  }
}

/* Studio features */

.section--studio {
  background:
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(111, 196, 184, 0.08), transparent 60%),
    var(--color-ink);
}

.feature-list {
  list-style: none;
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 2rem;
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}

.feature-list li {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.feature-list strong {
  font-size: 1.05rem;
  color: var(--color-white);
}

.feature-list span {
  color: var(--color-text-muted);
  font-size: 0.975rem;
}

@media (max-width: 900px) {
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .feature-list {
    grid-template-columns: 1fr;
  }
}

/* Publish */

.section--publish {
  background:
    linear-gradient(180deg, rgba(201, 162, 39, 0.05), transparent 40%),
    var(--color-navy-deep);
}

.publish-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.25);
}

.publish-panel__line {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.publish-panel__line.is-accent {
  background: rgba(208, 76, 76, 0.12);
  color: var(--color-white);
  border: 1px solid rgba(208, 76, 76, 0.28);
}

.tok {
  flex: 0 0 4.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.publish-panel__line.is-accent .tok {
  color: var(--color-gold-light);
}

@media (max-width: 800px) {
  .section__inner--split {
    grid-template-columns: 1fr;
  }
}

/* CTA */

.section--cta {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(208, 76, 76, 0.16), transparent 65%),
    var(--color-ink);
  padding-bottom: clamp(5rem, 12vw, 8rem);
}

.section--cta p {
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
  background: var(--color-navy-deep);
}

.site-footer__inner {
  width: min(var(--container), 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
}

.site-footer__tag {
  color: var(--color-text-muted);
  font-size: 0.925rem;
  flex: 1 1 12rem;
}

.site-footer__links a {
  font-weight: 700;
  color: var(--color-text-muted);
}

.site-footer__links a:hover {
  color: var(--color-teal);
}

/* —— Motion / reveal —— */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.reveal--up {
  transition-delay: 0s;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero .reveal--up:nth-child(1) { transition-delay: 0.05s; }
.hero .reveal--up:nth-child(2) { transition-delay: 0.14s; }
.hero .reveal--up:nth-child(3) { transition-delay: 0.23s; }
.hero .reveal--up:nth-child(4) { transition-delay: 0.32s; }
.hero .reveal--up:nth-child(5) { transition-delay: 0.41s; }

.reveal--fade {
  opacity: 0;
  transform: none;
}

.reveal--fade.is-visible {
  opacity: 1;
}

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

  .hero__glow,
  .studio-mock__hero-block::after,
  .studio-mock {
    animation: none !important;
  }

  .reveal,
  .reveal--fade {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}
