/* ==================================================
   1. Fonts
================================================== */

@font-face {
  font-family: "Inter";
  src: url("../font/Inter_18pt-Regular.woff2") format("woff2"),
    url("../font/Inter_18pt-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/Inter_18pt-Medium.woff2") format("woff2"),
    url("../font/Inter_18pt-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/Inter_24pt-SemiBold.woff2") format("woff2"),
    url("../font/Inter_24pt-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/Inter_24pt-Bold.woff2") format("woff2"),
    url("../font/Inter_24pt-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==================================================
   2. Root / Design Tokens
================================================== */

:root {
  --color-gold: #cf8b0c;
  --color-gold-hover: #b87a0a;
  --color-bg: #ececec;
  --color-bg-soft: #f5f5f5;
  --color-bg-hero-start: #c4c4c4;
  --color-bg-dark: #5a5a5a;
  --color-bg-footer: #3a3a3a;
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-text-muted: #6b6b6b;
  --color-text-on-dark: #ffffff;
  --color-border: #d2d2d2;
  --color-border-strong: #c3c3c3;
  --color-error: #b42318;

  --container-width: 85rem;
  --container-padding: clamp(1.25rem, 4vw, 2rem);

  --radius-sm: 0.4rem;
  --radius-md: 0.7rem;
  --radius-lg: 1rem;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: clamp(2.5rem, 5vw, 4rem);
  --space-xl: clamp(3.5rem, 7vw, 6rem);

  --font-size-h1: clamp(1.85rem, 1.15rem + 2.4vw, 3.15rem);
  --font-size-h2: clamp(1.2rem, 1.02rem + 0.85vw, 1.7rem);
  --font-size-h3: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  --font-size-p: clamp(0.9375rem, 0.9rem + 0.22vw, 1.0625rem);

  --shadow-button: 0 0.65rem 1.35rem rgb(207 139 12 / 0.28);
  --shadow-card: 0 0.75rem 1.75rem rgb(0 0 0 / 0.08);
  --focus-ring: 0 0 0 3px rgb(207 139 12 / 0.45);

  --section-space: clamp(3rem, 6.5vw, 5.5rem);
  --header-offset: 0;
}

/* ==================================================
   3. Reset / Base
================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--font-size-p);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-size: var(--font-size-p);
  font-weight: 500;
}

/* ==================================================
   4. Typography
================================================== */

h1,
h2,
.text-h1,
.text-h2 {
  font-size: var(--font-size-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.button {
  font-size: var(--font-size-h2);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h3,
.text-h3,
.package-select .button {
  font-size: var(--font-size-h3);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

p,
.text-p,
.form-field,
.form-field label,
.footer {
  font-size: var(--font-size-p);
  line-height: 1.6;
}

.lede {
  font-weight: 500;
}

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

.center {
  text-align: center;
}

/* ==================================================
   5. Layout / Container
================================================== */

.container {
  width: min(
    calc(100% - 2 * var(--container-padding)),
    var(--container-width)
  );
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

.section--hero {
  background: linear-gradient(
    180deg,
    var(--color-bg-hero-start) 0%,
    var(--color-bg-hero-start) 18%,
    var(--color-bg) 50%,
    var(--color-bg) 100%
  );
  padding-top: clamp(2rem, 4vw, 3.25rem);
}

.section--surface {
  background: var(--color-bg-soft);
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding-block: clamp(2.25rem, 4.5vw, 3.5rem);
}

.stack {
  display: grid;
  gap: var(--space-md);
}

.stack--lg {
  gap: var(--space-lg);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

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

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

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

.grid--process {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

/* ==================================================
   6. Reusable Components
================================================== */

.brand {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: clamp(3.5rem, 8vw, 4.75rem);
  height: auto;
}

.section--hero .brand__logo,
.page-header .brand__logo {
  width: clamp(4.25rem, 9vw, 6rem);
}

.brand__name {
  font-weight: 700;
  color: var(--color-text);
}

.brand__note {
  font-weight: 400;
  color: var(--color-text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.7rem 1.8rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-gold);
  color: var(--color-text-on-dark);
  text-decoration: none;
  box-shadow: var(--shadow-button);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.button:hover {
  background: var(--color-gold-hover);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button--block {
  width: 100%;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: var(--shadow-card);
}

.card__media {
  width: min(100%, 11rem);
  margin: 0 auto var(--space-sm);
}

.card__title {
  margin-bottom: 0.55rem;
}

.icon-round {
  width: 4.5rem;
  height: 4.5rem;
  margin-inline: auto;
  margin-bottom: var(--space-sm);
}

.feature {
  text-align: center;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  text-align: center;
}

.stat__value {
  margin-bottom: 0.45rem;
  color: var(--color-text-on-dark);
}

.stat p {
  color: rgb(255 255 255 / 0.92);
}

.trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
  text-align: center;
}

.trust__icon {
  width: 4.75rem;
  height: 4.75rem;
  margin: 0 auto var(--space-sm);
}

.compare-visual {
  width: min(44rem, 100%);
  margin-inline: auto;
}

.hero-visual {
  width: min(38rem, 100%);
  margin-inline: auto;
  margin-top: calc(var(--space-sm) - var(--space-lg));
  filter: drop-shadow(0 1.25rem 1.5rem rgb(0 0 0 / 0.18));
}

.process-visual {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.steps {
  list-style: none;
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.7rem;
  align-items: start;
}

.steps li:not(:last-child) {
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--color-border-strong);
}

.steps li::before {
  counter-increment: step;
  content: counter(step) ".";
  font-weight: 700;
  color: var(--color-gold);
}

.package-select {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  align-items: stretch;
}

.package-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  padding: 0;
  border-color: color-mix(in srgb, var(--color-gold) 42%, var(--color-border));
}

.package-card__head {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--color-gold);
  color: var(--color-text-on-dark);
  text-align: center;
  font-size: var(--font-size-h3);
}

.package-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-md);
  padding: clamp(1.25rem, 2.4vw, 2rem) 1.25rem 1.4rem;
  text-align: center;
}

.package-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem 0.2rem;
}

.package-card__prefix {
  flex-basis: 100%;
  font-weight: 600;
  color: var(--color-text-muted);
}

.package-card__currency {
  font-size: var(--font-size-h3);
  font-weight: 700;
  line-height: 1;
  margin-top: 0.35em;
}

.package-card__period {
  flex-basis: 100%;
  font-weight: 600;
}

.package-card__note {
  color: var(--color-text-muted);
}

.package-card__cta {
  width: 100%;
  margin-top: auto;
}

.package-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem) minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem;
}

.package-hero__gold {
  width: auto;
  max-width: 100%;
  height: calc(30rem * 550 / 1181);
  object-fit: contain;
  justify-self: end;
  filter: drop-shadow(0 1rem 1.25rem rgb(0 0 0 / 0.16));
}

.package-hero__gold--end {
  justify-self: start;
}

.back-to-top {
  position: fixed;
  right: var(--container-padding);
  bottom: 1.25rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-bg-footer);
  color: var(--color-text-on-dark);
  text-decoration: none;
  border: 1px solid rgb(255 255 255 / 0.28);
  box-shadow: 0 0.45rem 1.1rem rgb(0 0 0 / 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.4rem);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease,
    background-color 0.2s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.back-to-top svg {
  width: 1.1rem;
  height: 1.1rem;
}

.site-footer {
  position: relative;
  background: var(--color-bg-footer);
  color: var(--color-text-on-dark);
  padding-block: var(--space-lg);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  margin-bottom: var(--space-md);
  text-align: center;
}

.footer-nav a {
  color: var(--color-text-on-dark);
  text-decoration: none;
  font-weight: 500;
}

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

.site-footer p {
  color: rgb(255 255 255 / 0.86);
  text-align: center;
}

.thank-you {
  min-height: 70vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-md);
  text-align: center;
}

/* ==================================================
   7. Forms
================================================== */

.form {
  display: grid;
  gap: var(--space-md);
}

.form.card {
  background: var(--color-surface);
}

.form-section {
  display: grid;
  gap: 0.2rem;
}

.form-section [data-visible-when] {
  display: grid;
  gap: 0.2rem;
}

.form-heading {
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border-strong);
  font-size: var(--font-size-h3);
}

.form-intro {
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.form-row {
  display: grid;
  gap: 0.2rem;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  align-items: center;
  padding-block: 0.35rem;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.25rem;
  cursor: pointer;
}

.choice input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--color-gold);
}

.form a {
  color: var(--color-gold);
  font-weight: 500;
}

.form-field {
  position: relative;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.85rem 0 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--color-border-strong);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  outline: none;
  line-height: 1.3;
}

.form-field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.form-field label {
  position: absolute;
  left: 0;
  top: 0.75rem;
  color: var(--color-text-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.2s ease, color 0.2s ease;
  line-height: 1.3;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: transparent;
}

.form-field:focus-within label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:not(:placeholder-shown) + label,
.form-field select:not([value=""]) + label,
.form-field--float label {
  transform: translateY(-0.85rem) scale(0.85);
  color: var(--color-text);
}

.form-field:focus-within label {
  color: var(--color-gold);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-bottom-color: var(--color-gold);
}

.form-field.is-invalid input,
.form-field.is-invalid textarea,
.form-field.is-invalid select {
  border-bottom-color: var(--color-error);
}

.form-field__error {
  min-height: 0;
  margin-top: 0.1rem;
  color: var(--color-error);
  font-weight: 500;
  line-height: 1.3;
}

.required-mark {
  color: var(--color-gold);
}

.form-actions {
  display: grid;
  gap: var(--space-sm);
}

.form-consent {
  align-items: flex-start;
}

.form-consent input {
  margin-top: 0.35rem;
}

.form-status[hidden] {
  display: none;
}

.form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgb(180 35 24 / 0.08);
  color: var(--color-error);
}

/* ==================================================
   8. Page Sections
================================================== */

.hero-copy {
  max-width: 16em;
  margin-inline: auto;
  margin-top: calc(var(--space-sm) - var(--space-lg));
}

.section--hero .hero-copy + p {
  margin-top: calc(var(--space-md) - var(--space-lg));
}

.page-header {
  padding-top: clamp(2rem, 4vw, 3.25rem);
  padding-bottom: var(--space-md);
}

.subpage {
  background: var(--color-bg-soft);
}

.form-page {
  padding-bottom: var(--space-xl);
}

/* ==================================================
   9. Accessibility
================================================== */

.skip-link {
  position: absolute;
  left: var(--container-padding);
  top: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--color-gold);
  color: var(--color-text-on-dark);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

.button:focus-visible,
.back-to-top:focus-visible,
.footer-nav a:focus-visible,
.brand:focus-visible {
  outline-offset: 4px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================================================
   10. Responsive Adjustments
================================================== */

@media (max-width: 85rem) {
  .grid--4,
  .stats,
  .trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 60rem) {
  .section--hero {
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .section--hero > .container {
    flex: 1 1 auto;
    align-content: space-evenly;
    gap: clamp(0.5rem, 2.2vh, 1.25rem);
  }

  .section--hero .hero-visual {
    width: min(28rem, 86%);
    margin-top: 0;
  }

  .section--hero .hero-visual img {
    max-height: min(32vh, 14rem);
    width: auto;
    margin-inline: auto;
  }

  .section--hero .hero-copy,
  .section--hero .hero-copy + p {
    margin-top: 0;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .package-select,
  .grid--process,
  .stats,
  .trust {
    grid-template-columns: 1fr;
  }

  .package-select {
    gap: var(--space-lg);
  }

  .package-hero {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .package-hero__gold {
    display: none;
  }

  .package-card__head {
    background: #e6e6e6;
    color: var(--color-text);
  }
}

@media (max-width: 30rem) {
  .hero-copy {
    max-width: none;
  }

  .button:not(.package-card__cta) {
    width: min(100%, 22rem);
  }

  .package-card__cta,
  .form .button {
    width: 100%;
  }
}

@media (hover: none) {
  .button:hover {
    transform: none;
  }
}
