/*
  Surf Exams Site Styles
  Shared styles for all static pages.
*/

/* ====================
   CSS Variables
==================== */
:root {
  --bg: #f2f8f8;
  --surface: #ffffff;
  --surface-soft: #e7f1f1;
  --text: #102733;
  --text-muted: #496370;
  --border: #d1e1e2;
  --primary: #0f4258;
  --primary-strong: #0a3142;
  --accent: #43b7a7;
  --accent-soft: #d6f1ed;
  --shadow: 0 10px 28px rgba(7, 34, 47, 0.11);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 80px;
  --container: 1100px;
}

/* ====================
   Base
==================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 15% 0%, #eef9f7 0%, #f2f8f8 35%, #f2f8f8 100%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.62;
}

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

a {
  color: var(--primary);
}

a:hover,
a:focus-visible {
  color: var(--primary-strong);
}

:focus-visible {
  outline: 3px solid #0b7f9b;
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  top: -140px;
  left: 1rem;
  z-index: 999;
  background: #00131d;
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.85rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.16rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding-left: 1.2rem;
}

/* ====================
   Header + Nav
==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid rgba(16, 39, 51, 0.08);
  backdrop-filter: blur(10px);
}

.site-header.scrolled {
  box-shadow: 0 8px 20px rgba(7, 34, 47, 0.08);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-banner {
  height: clamp(40px, 5.2vw, 56px);
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font: inherit;
}

.tab-nav {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.tab-nav a {
  text-decoration: none;
  color: var(--text);
  border-radius: 999px;
  padding: 0.48rem 0.82rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.tab-nav a:hover,
.tab-nav a:focus-visible {
  background: var(--surface-soft);
}

.tab-nav a.active {
  background: var(--primary);
  color: #fff;
}

/* ====================
   Sections + Layout
==================== */
.site-main {
  padding-top: 0.5rem;
}

.section {
  padding: 1rem 0;
}

.section + .section {
  border-top: 1px solid rgba(16, 39, 51, 0.07);
}

.eyebrow {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  color: var(--primary);
}

.lede {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--text-muted);
  max-width: 65ch;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem;
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1.2fr 1fr;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.card p,
.card li {
  color: var(--text-muted);
}

.card:hover {
  transform: translateY(-3px);
  transition: transform 180ms ease;
}

.subtle {
  background: linear-gradient(180deg, transparent, rgba(67, 183, 167, 0.12));
}

/* ====================
   Buttons
==================== */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.68rem 1rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: var(--primary-strong);
  color: #fff;
}

.btn.secondary {
  background: var(--accent-soft);
  border-color: #b4e0da;
  color: #09433c;
}

.btn.secondary:hover,
.btn.secondary:focus-visible {
  background: #c4ebe5;
  color: #063831;
}

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

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
}

/* ====================
   Welcome Page
==================== */
.hero {
  padding: 1.8rem 0 1.4rem;
}

.hero .grid-2 {
  grid-template-columns: 1fr 1.15fr;
}

.hero-copy {
  background: linear-gradient(140deg, rgba(67, 183, 167, 0.13), rgba(15, 66, 88, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.arrl-mark {
  float: left;
  width: min(110px, 30%);
  margin: 0.2rem 0.95rem 0.55rem 0;
}

.arrl-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-intro-tail {
  clear: both;
}

.banner {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.6rem;
  box-shadow: var(--shadow);
  margin: 0;
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: calc(var(--radius) - 8px);
  object-fit: cover;
}

.photo-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.photo {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #e4eded;
}

.photo figcaption {
  padding: 0.55rem 0.65rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.photo img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.session-list {
  display: grid;
  gap: 0.85rem;
}

.session-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
}

.session-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.online-option-logo {
  width: min(105px, 40%);
  height: auto;
  float: right;
  margin: 0.2rem 0 0.6rem 0.9rem;
}

.process-intro-image {
  width: 50%;
  height: auto;
  margin-inline: auto;
}

.process-intro-list {
  margin-bottom: 0.8rem;
}

.list-gap-after {
  margin-bottom: 0.8rem;
}

/* ====================
   Prepare/Register/Process/After
==================== */
.step-list {
  display: grid;
  gap: 0.9rem;
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.step-list > li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1rem 1rem 3rem;
  position: relative;
}

.step-list > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.badge {
  background: var(--surface-soft);
  color: var(--primary-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.68rem;
  font-size: 0.83rem;
}

.note-list {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0.9rem 0 0;
}

.note-list-tight {
  margin-top: 0;
}

.note-list-label {
  margin: 0 0 0.15rem;
  line-height: 1.2;
}

.note-item,
.note-list > li.note {
  margin: 0 0 0.45rem;
  padding: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.note-item strong,
.note-list > li.note strong {
  color: var(--text);
}

.youth-coppa-callout {
  margin: 0.4rem 0 1rem;
}

.coppa-trigger {
  display: inline;
  font: inherit;
  color: var(--primary);
  background: transparent;
  border: 0;
  padding: 0;
  margin-left: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.coppa-details {
  display: inline;
}

.coppa-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.coppa-details summary::-webkit-details-marker {
  display: none;
}

.coppa-popover {
  width: 90%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.6rem;
  box-shadow: var(--shadow);
  color: var(--text);
  background: #fff;
}

.coppa-popover p {
  margin-bottom: 0;
}

/* ====================
   Partnerships
==================== */
.ve-scroller {
  overflow-x: auto;
  padding: 0.15rem 0 0.45rem;
  scroll-snap-type: x proximity;
}

.ve-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.6rem;
}

.ve-card {
  flex: 0 0 192px;
  text-align: center;
  scroll-snap-align: start;
}

.ve-photo {
  width: 192px;
  height: 192px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0;
  margin: 0 auto 0.45rem;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(7, 34, 47, 0.08);
}

.ve-name {
  margin: 0 0 0.02rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
}

.ve-call {
  margin: 0;
  line-height: 1.1;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.partner-card {
  display: grid;
  gap: 0.9rem;
}

.partner-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.4rem;
  object-fit: contain;
}

.partner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#contact-us form {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

#contact-us input,
#contact-us textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

#contact-us textarea {
  resize: vertical;
  min-height: 8rem;
}

#contact-us .hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ====================
   FAQ
==================== */
.faq-category + .faq-category {
  margin-top: 1.5rem;
}

.faq-category > h2 {
  margin-bottom: 0.95rem;
}

details + details {
  margin-top: 0.9rem;
}

summary {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "\25B8";
  color: var(--primary);
  line-height: 1.2;
  width: 0.9rem;
  text-align: center;
  margin-top: 0.05rem;
  transition: transform 150ms ease;
}

details[open] > summary::before {
  transform: rotate(90deg);
}

details > p {
  margin-top: 0.55rem;
  margin-left: calc(0.9rem + 0.55rem);
}

/* ====================
   Footer
==================== */
.site-footer {
  border-top: 1px solid rgba(16, 39, 51, 0.09);
  background: #fff;
}

.footer-inner {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.fineprint {
  margin: 0;
  font-size: 0.82rem;
  color: #5c757f;
}

/* ====================
   Utility + Animation
==================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 360ms ease, transform 360ms ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.team-name {
  display: inline-block;
  /*
  padding: 0.05rem 0.4rem;
  border-radius: 0.45rem;
  border: 1px solid #b9d8d4;
  background: #edf7f5;
  */
  color: #0a3c4f;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.placeholder-text {
  color: #7f8f98;
  position: relative;
  cursor: help;
}

.placeholder-text::after {
  content: "Placeholder text";
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.45rem);
  background: rgba(16, 39, 51, 0.94);
  color: #fff;
  font-style: normal;
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 20;
}

.placeholder-text[data-placeholder]::after {
  content: attr(data-placeholder);
}

.placeholder-text:hover::after,
.placeholder-text:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.exam-ui {
  font-size: 0.85em;
  color: #4954fb;
  font-weight: bold;
}

.section-gap-top {
  margin-top: 1.1rem;
}

/* ====================
   Responsive
==================== */
@media (max-width: 960px) {
  .tab-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    right: 1.1rem;
    left: 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 0.6rem;
    flex-direction: column;
    align-items: stretch;
  }

  .tab-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-block;
  }

  .grid-2,
  .cards {
    grid-template-columns: 1fr;
  }

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

  .site-main {
    padding-top: 0.35rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 74px;
  }

  body {
    line-height: 1.58;
  }

  .hero {
    padding-top: 1.2rem;
  }

  .photo-grid,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 0.9rem 0;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .arrl-mark {
    float: none;
    width: min(140px, 42%);
    margin: 0.35rem 0 0.75rem;
  }

  .hero-intro-tail {
    clear: none;
  }

  .online-option-logo {
    float: none;
    margin: 0.25rem 0 0.8rem;
  }

  .process-intro-image {
    width: min(70%, 260px);
  }
}

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

  .card:hover {
    transform: none;
  }

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