/* ===== Apple Gift Store — design system ===== */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-ink: #0066cc;
  --danger: #d8261c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.16);
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
.svg-sprite { position: absolute; }
.hidden { display: none !important; }

h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.eyebrow {
  margin-bottom: 12px;
  color: var(--blue-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.eyebrow--center { text-align: center; }

.section-sub {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 19px;
  text-align: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, transform 0.12s ease, box-shadow 0.22s ease;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }
.btn--primary:active { transform: scale(0.985); }
.btn--primary:disabled { opacity: 0.55; cursor: progress; }
.btn--ghost { color: var(--blue-ink); }
.btn--ghost:hover { text-decoration: underline; }
.btn--block { width: 100%; min-height: 54px; font-size: 18px; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  height: 56px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; }
.brand__mark { width: 18px; height: 22px; fill: var(--ink); }
.brand__text { font-size: 19px; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 4px; margin-right: auto; }
.nav__links a {
  padding: 7px 12px;
  border-radius: 980px;
  color: var(--ink-soft);
  font-size: 14px;
}
.nav__links a:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.nav__cta {
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.nav__cta:hover { background: var(--blue-hover); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 85% 0%, #eef2ff 0%, rgba(238, 242, 255, 0) 55%),
    radial-gradient(90% 70% at 0% 100%, #fff0f6 0%, rgba(255, 240, 246, 0) 50%),
    var(--bg);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 88px;
}
.hero h1 {
  font-size: clamp(44px, 6.2vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.hero__lead {
  max-width: 460px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.4;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 30px; }
.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 34px;
  color: var(--ink-soft);
  font-size: 15px;
}
.hero__points li { display: inline-flex; align-items: center; gap: 8px; }
.tick { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--blue); color: #fff; }

/* Gift cards art */
.hero__art {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}
.giftcard {
  position: absolute;
  width: min(360px, 84%);
  aspect-ratio: 1.585 / 1;
  padding: 26px;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}
.giftcard--front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(140% 120% at 80% 0%, #ffffff 0%, #f3f3f6 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transform: translate(8%, 12%) rotate(4deg);
  z-index: 2;
}
.giftcard--back {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(140deg, #1f1f24 0%, #38383d 55%, #19191d 100%);
  transform: translate(-22%, -16%) rotate(-9deg);
  z-index: 1;
}
.giftcard__apple { width: 58px; height: 70px; }
.giftcard__appicon { width: 58px; height: 58px; border-radius: 15px; }
.giftcard__appicon svg { width: 60%; height: 60%; }
.giftcard__brand { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.giftcard__row { display: flex; align-items: center; justify-content: space-between; }
.giftcard--front .giftcard__brand { color: var(--ink); }
.giftcard__chip {
  width: 40px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #e6c878, #b8923f);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}

/* ===== Apps / where it works ===== */
.apps { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 92px 0; }
.apps__head h2,
.order__head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; letter-spacing: -0.02em; text-align: center; }
.apps__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 46px;
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.app:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.app strong { font-size: 15px; font-weight: 600; }
.app small { color: var(--muted); font-size: 12px; }
.app-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
  border-radius: 15px;
  color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 6px 14px rgba(0, 0, 0, 0.14);
}
.app-icon svg { width: 60%; height: 60%; }
.app-icon--store  { background: linear-gradient(180deg, #1fbcff 0%, #0a84ff 100%); }
.app-icon--itunes { background: linear-gradient(180deg, #d24bff 0%, #7b2ff7 100%); }
.app-icon--music  { background: linear-gradient(180deg, #ff5b7a 0%, #fa233b 100%); }
.app-icon--icloud { background: linear-gradient(180deg, #54b8ff 0%, #2b8eff 100%); }
.app-icon--icloud svg { width: 64%; }
.app-icon--tv     { background: linear-gradient(180deg, #2b2b30 0%, #050507 100%); }
.app-icon--arcade { background: linear-gradient(180deg, #6a5bff 0%, #d23bff 100%); }

/* ===== Order / checkout ===== */
.order {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 96px;
}
.order__head { margin-bottom: 36px; }

.notice {
  max-width: 760px;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #fff7e6;
  border: 1px solid #f3deb0;
  color: #6b4e00;
  font-size: 15px;
  text-align: center;
}

.checkout {
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: start;
  gap: 28px;
}
.checkout__main {
  display: grid;
  gap: 14px;
}
.step {
  margin: 0;
  padding: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.step legend {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.step__num {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.field-hint { margin-top: 14px; color: var(--muted); font-size: 13px; }

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.country-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease, background 0.16s ease;
}
.country-option:hover { border-color: #9d9da3; transform: translateY(-1px); }
.country-option.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
  background: #f5f9ff;
}
.country-option__flag {
  flex: none;
  width: 34px;
  height: 24px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.country-option__flag svg { width: 100%; height: 100%; display: block; }
.country-option__text { display: grid; }
.country-option__name { font-size: 15px; font-weight: 600; line-height: 1.2; }
.country-option__cur { color: var(--muted); font-size: 12px; }

/* Amount dropdown */
.amount-select { position: relative; }
.amount-select__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.amount-select__btn:hover { border-color: #9d9da3; }
.amount-select.is-open .amount-select__btn,
.amount-select__btn:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
  outline: none;
}
.amount-select__current { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.amount-select__face { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.amount-select__price { color: var(--muted); font-size: 14px; }
.amount-select__chev { width: 22px; height: 22px; flex: none; color: var(--muted); transition: transform 0.22s ease; }
.amount-select.is-open .amount-select__chev { transform: rotate(180deg); }

.amount-select__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 304px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.amount-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.amount-select__option:hover { background: var(--surface-2); }
.amount-select__option[aria-selected="true"] { background: #f0f6ff; }
.amount-select__option .opt-face { font-size: 16px; font-weight: 600; }
.amount-select__option[aria-selected="true"] .opt-face { color: var(--blue-ink); }
.amount-select__option .opt-price { color: var(--muted); font-size: 14px; white-space: nowrap; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; }
.field > span { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input::placeholder { color: #aeaeb4; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16); }

/* Summary aside */
.summary {
  position: sticky;
  top: 76px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.summary__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(120% 140% at 90% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%),
    linear-gradient(140deg, #ff2d6f 0%, #c640e8 38%, #5e5ce6 70%, #0a84ff 100%);
}
.summary__apple { width: 30px; height: 36px; fill: #fff; margin-bottom: 10px; }
.summary__brand { font-size: 14px; font-weight: 600; opacity: 0.92; }
.summary__region { font-size: 13px; opacity: 0.85; }
.summary__amount { margin-top: 6px; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }

.summary__list { margin: 20px 0; display: grid; gap: 1px; }
.summary__list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}
.summary__list dt { color: var(--muted); font-size: 14px; }
.summary__list dd { margin: 0; font-weight: 600; font-size: 15px; text-align: right; overflow-wrap: anywhere; }

.summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}
.summary__total span { color: var(--muted); font-size: 15px; }
.summary__total strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }

.form-error {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #fff0ef;
  color: var(--danger);
  font-size: 14px;
}
.summary__trust {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}
.lock { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #34a853; }

/* ===== How to ===== */
.howto { background: var(--surface-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.howto__inner { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 88px 0; }
.section-title { margin-bottom: 32px; }
.section-title h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.howto__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.howto__card { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.howto__dev {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.howto__card ol { display: grid; gap: 12px; counter-reset: step; }
.howto__card li {
  position: relative;
  padding-left: 38px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.howto__card li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -1px;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ===== FAQ ===== */
.faq { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 92px 0; }
.faq details {
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-size: 26px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 14px; color: var(--muted); font-size: 17px; line-height: 1.5; }

/* ===== Footer ===== */
.footer { background: var(--surface-2); border-top: 1px solid var(--line-soft); }
.footer__inner { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0; }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.footer__mark { width: 15px; height: 18px; fill: var(--ink); }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 18px 0; }
.footer__links a { color: var(--ink-soft); font-size: 14px; }
.footer__links a:hover { color: var(--ink); text-decoration: underline; }
.footer__legal {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ===== Status page (success) ===== */
.status-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.status-card {
  width: min(560px, 100%);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line-soft);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.status-check {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #e7f6ec;
  color: #1d8a44;
}
.status-check--pending {
  background: #eef4ff;
  color: var(--blue);
}
.status-check--paid {
  background: #e7f6ec;
  color: #1d8a44;
}
.status-check--failed {
  background: #fff0ef;
  color: var(--danger);
}
.status-check svg { width: 38px; height: 38px; }
.status-card h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 600; letter-spacing: -0.02em; }
.status-card p { margin-top: 14px; color: var(--muted); }
.status-box {
  display: grid;
  gap: 4px;
  margin: 26px 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.status-box span { color: var(--muted); font-size: 13px; }
.status-box strong { word-break: break-all; font-size: 18px; }
.status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 8px; padding: 56px 0 64px; }
  .hero__art { order: -1; min-height: 280px; margin-bottom: 18px; }
  .giftcard { width: min(320px, 80%); }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .apps__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .hero__lead { font-size: 19px; }
  .hero__points { gap: 8px 16px; }
  .apps__grid { grid-template-columns: repeat(2, 1fr); }
  .howto__grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .apps, .order, .faq { padding-top: 56px; padding-bottom: 56px; }
}
@media (max-width: 460px) {
  .step, .summary { padding: 18px; }
  .nav__cta { display: none; }
}
