/* ─── Design tokens ────────────────────────────────────────────────────── */
:root {
  --navy:     #1a2744;
  --crimson:  #b5202e;
  --paper:    #f7f4ef;
  --charcoal: #2c2c2c;
  --hero-bg:  #0b0d14;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-card: 14px;
  --radius-btn:  12px;
}

/* ─── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ─── App Store badge button ───────────────────────────────────────────── */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border-radius: var(--radius-btn);
  padding: 10px 22px;
  border: 1.5px solid rgba(255,255,255,0.15);
  transition: opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}
.appstore-btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.appstore-btn:active { opacity: 1;    transform: translateY(0); }

.appstore-btn--dark  { background: var(--charcoal); border-color: transparent; }
.appstore-btn--sm    { padding: 8px 16px; gap: 8px; }

.appstore-logo { width: 22px; height: 22px; flex-shrink: 0; fill: #fff; }
.appstore-text { display: flex; flex-direction: column; line-height: 1.15; }
.appstore-small { font-size: 10px; letter-spacing: 0.02em; opacity: 0.85; }
.appstore-large { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  padding: 80px 60px 88px;
  position: relative;
  overflow: hidden;
}

/* Crimson glow centred on the phone (right side of hero) */
.hero::before {
  content: '';
  position: absolute;
  /* Sits roughly behind where the phone renders */
  right: -5%;
  top: -10%;
  width: 65%;
  height: 130%;
  background: radial-gradient(
    ellipse 60% 55% at 65% 48%,
    rgba(181, 32, 46, 0.28) 0%,
    rgba(181, 32, 46, 0.10) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 72px;
  position: relative;
  z-index: 1;
}

/* Left: text */
.hero-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Wordmark — "Watch" in Prodigal Red, matching the in-app logo */
.wordmark-red { color: var(--crimson); }

/* App icon */
.hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;          /* iOS-style rounded square */
  box-shadow: 0 4px 20px rgba(0,0,0,0.50);
  margin-bottom: 20px;
  flex-shrink: 0;
}

.hero-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: 20px;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(40px, 4.8vw, 68px);
  font-weight: 600;
  line-height: 1.06;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.60);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
  margin-bottom: 36px;
}

/* Right: phone */
.hero-phone {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Perspective applied here so the 3D rotation has depth */
  perspective: 1200px;
  perspective-origin: 50% 40%;
}

/* ─── iPhone 3D wrapper — carries the rotation ─────────────────────────── */
.iphone-wrapper {
  position: relative;
  width: 200px;
  height: 434px;
  /* Tilt: Y shows the right side face, X tips the top slightly back */
  transform: rotateY(-24deg) rotateX(6deg);
  transform-style: preserve-3d;
}

/* ─── Front face ───────────────────────────────────────────────────────── */
.iphone-frame {
  position: absolute;
  inset: 0;
  border-radius: 42px;
  border: 2px solid transparent;
  /* Gradient border (titanium): bright top-left catches light, dims toward bottom-right.
     padding-box keeps the inner fill solid; border-box defines the gradient stroke. */
  background:
    linear-gradient(#0f0f0f, #0f0f0f) padding-box,
    linear-gradient(
      135deg,
      rgba(240,240,240,0.65) 0%,
      rgba(180,180,180,0.35) 20%,
      rgba(90,90,90,0.20)   50%,
      rgba(40,40,40,0.25)   80%,
      rgba(20,20,20,0.30)  100%
    ) border-box;
  overflow: hidden;
  box-shadow:
    32px 56px 120px rgba(0,0,0,0.90),
    12px 20px 44px rgba(0,0,0,0.55),
    /* subtle inner left-edge highlight to reinforce the lit side */
    inset 1px 0 0 rgba(255,255,255,0.08);
}

/* Lighting gradient: left edge (nearer) slightly brighter, right edge darker */
.iphone-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.07) 0%,
    transparent 30%,
    rgba(0,0,0,0.20) 100%
  );
  pointer-events: none;
  z-index: 3;
}

/* Dynamic Island */
.iphone-dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 21px;
  background: #000;
  border-radius: 16px;
  z-index: 5;
}

/* Screen fills the frame */
.iphone-screen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}

.iphone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ─── Right edge face — phone thickness ────────────────────────────────── */
.iphone-edge {
  position: absolute;
  top: 5%;
  left: 199px;           /* flush with right edge of the 200px frame */
  height: 90%;
  width: 20px;           /* phone thickness at this scale */
  background: linear-gradient(to right, #2a2a2a 0%, #1a1a1a 55%, #0d0d0d 100%);
  border-radius: 0 6px 6px 0;
  transform: rotateY(90deg);
  transform-origin: left center;
}

/* ─── Mobile: stack vertically ────────────────────────────────────────── */
@media (max-width: 780px) {
  .hero {
    padding: 88px 28px 64px;
  }

  /* Recentre the glow to sit behind the phone rather than the right edge */
  .hero::before {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    height: 60%;
    background: radial-gradient(
      ellipse 70% 80% at 50% 80%,
      rgba(181, 32, 46, 0.28) 0%,
      rgba(181, 32, 46, 0.10) 45%,
      transparent 70%
    );
  }

  .hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 48px;
    text-align: center;
  }
  .hero-text {
    align-items: center;
  }
  .iphone-wrapper {
    width: 170px;
    height: 369px;
    /* Flatten the rotation on mobile — no side face needed when centred */
    transform: rotateY(0deg) rotateX(0deg);
  }
  /* Hide the 3D edge — irrelevant and intrusive when the phone is centred */
  .iphone-edge {
    display: none;
  }
}

/* ─── League section ───────────────────────────────────────────────────── */
.league-section {
  background: var(--paper);
  padding: 88px 40px 96px;
}

.league-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 12px;
}

.section-headline {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin-bottom: 52px;
  line-height: 1.1;
}

/* ─── Watch grid ───────────────────────────────────────────────────────── */
.watch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  margin-bottom: 60px;
}

@media (max-width: 600px) {
  .watch-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .league-section { padding: 64px 20px 72px; }
}

/* Watch card */
.watch-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #e0dbd3;
  aspect-ratio: 1 / 1;
  position: relative;
  box-shadow: 0 2px 14px rgba(26,39,68,0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

a.watch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(26,39,68,0.20);
}

/* Images: absolute fill */
.watch-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Bottom info overlay */
.watch-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 56px 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, transparent 100%);
  z-index: 1;
}

.watch-card-brand {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-bottom: 3px;
}

.watch-card-model {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

/* Rank badge — top left, crimson pill */
.watch-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--crimson);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 20px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Skeleton shimmer */
.watch-card.skeleton {
  background: linear-gradient(90deg, #ddd8d0 25%, #e8e4dd 50%, #ddd8d0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* League CTA */
.league-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.league-cta-text {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.5vw, 25px);
  font-style: italic;
  color: var(--navy);
  text-align: center;
  opacity: 0.78;
}

/* ─── Members section ──────────────────────────────────────────────────── */
.members-section {
  background: var(--navy);
  padding: 88px 40px 96px;
}

.members-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.members-headline {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 600;
  color: #fff;
  text-align: center;
  margin-bottom: 52px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.member-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px 24px;
  width: 100%;
}

.member-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 88px;
  text-decoration: none;
}

.member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.14);
  display: block;
  flex-shrink: 0;
}

.member-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 2px solid rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: rgba(255,255,255,0.60);
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.member-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

.member-handle {
  font-size: 11px;
  color: rgba(255,255,255,0.42);
  text-align: center;
  margin-top: -4px;
}

a.member-card:hover .member-avatar,
a.member-card:hover .member-avatar-placeholder {
  border-color: rgba(255,255,255,0.40);
}

a.member-card:hover .member-name {
  color: #fff;
}

.member-card.member-skeleton .member-avatar-placeholder {
  background: linear-gradient(90deg, rgba(255,255,255,0.07) 25%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0.07) 75%);
  background-size: 200% 100%;
  animation: shimmer-dark 1.5s infinite;
}

.member-card.member-skeleton::after {
  content: '';
  width: 56px;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.07) 25%, rgba(255,255,255,0.13) 50%, rgba(255,255,255,0.07) 75%);
  background-size: 200% 100%;
  animation: shimmer-dark 1.5s infinite;
}

@keyframes shimmer-dark {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 600px) {
  .members-section { padding: 64px 20px 72px; }
  .member-row { gap: 24px 20px; }
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: 48px 24px;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
}
.footer-links a { color: rgba(255,255,255,0.48); transition: color 0.15s; }
.footer-links a:hover { color: rgba(255,255,255,0.88); }
.footer-sep { opacity: 0.28; }
