/* Dive Careers — credential platform. Diver-down red on cool paper, logbook-stamp logic. */

:root {
  --paper:  #f4f6f6;
  --card:   #ffffff;
  --ink:    #0e1a1c;
  --ink-2:  #4a5f63;
  --red:    #c8102e;
  --red-dk: #a30d25;
  --sea:    #0b6e75;
  --rule:   rgba(14, 26, 28, .14);
  --rule-2: rgba(14, 26, 28, .28);

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;

  --gut: clamp(1.25rem, 5vw, 4rem);
  --max: 78rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 30;
  background: var(--red); color: #fff;
  padding: .6rem 1rem; border-radius: 3px;
}
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- brand + bar ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.flag { width: 28px; height: auto; display: block; }
.brand span {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.bar {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  max-width: var(--max);
  margin-inline: auto;
  padding: 1.15rem var(--gut);
}
.bar .brand { margin-right: auto; }

.bar-nav { display: flex; gap: 1.6rem; }
.bar-nav a {
  text-decoration: none;
  font-size: .9375rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.bar-nav a:hover { border-bottom-color: var(--red); }

.bar-cta {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}
.bar-cta:hover { text-decoration: underline; }

@media (max-width: 52rem) {
  .bar { flex-wrap: wrap; row-gap: .8rem; }
  .bar .brand { width: 100%; margin-right: 0; }
  .bar-nav { gap: 1.15rem; margin-right: auto; font-size: .875rem; }
  .bar-cta { font-size: .875rem; }
}

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
  padding: .85rem 1.5rem;
  border: 1px solid var(--red);
  border-radius: 3px;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--red-dk); border-color: var(--red-dk); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-quiet:hover { background: transparent; border-color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 1rem + 4.6vw, 4rem);
  max-width: 15ch;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
  color: var(--ink-2);
  max-width: 44ch;
  margin: 1.5rem 0 0;
}

@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- the profile card ---------- */

.card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  box-shadow: 0 18px 40px -28px rgba(14, 26, 28, .5);
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.15rem;
}
.avatar {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: .02em;
}
.card-head h2 { font-size: 1.3125rem; font-weight: 700; }
.role { margin: .2rem 0 0; font-size: .875rem; color: var(--ink-2); }

.avail {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .65rem 1.5rem;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--sea);
  background: rgba(11, 110, 117, .07);
  border-block: 1px solid var(--rule);
}
.dot {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--sea);
  flex: none;
}

.card-body { padding: 1.35rem 1.5rem .35rem; }
.card-body h3 {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--ink-2);
  margin-bottom: .6rem;
}
.card-body h3 + ul { margin-bottom: 1.35rem; }

.creds { list-style: none; margin: 0; padding: 0; }
.creds li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .9375rem;
}
.creds li:last-child { border-bottom: 0; }
.creds b {
  flex: none;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.creds .ok { color: var(--sea); }
.creds .ok::before { content: "✓ "; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--rule);
  background: rgba(14, 26, 28, .025);
}
.stats > div { padding: .9rem 1.5rem; }
.stats > div + div { border-left: 1px solid var(--rule); }
.stats dt { font-size: .6875rem; font-weight: 600; letter-spacing: .06em; color: var(--ink-2); }
.stats dd {
  margin: .15rem 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.card figcaption {
  padding: .6rem 1.5rem .75rem;
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}

@media (max-width: 26rem) {
  .stats > div { padding-inline: 1rem; }
  .card-head, .avail, .card-body, .card figcaption { padding-inline: 1.1rem; }
}

/* ---------- what a profile holds ---------- */

.profile {
  background: var(--card);
  border-block: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 9vw, 6rem);
}

.profile h2, .centres h2, .reviews h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.75rem);
}

.section-lede {
  font-size: 1.125rem;
  color: var(--ink-2);
  max-width: 54ch;
  margin: 1rem 0 0;
}

.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--rule-2);
}
.fields article {
  padding: 1.75rem clamp(1.25rem, 2.2vw, 2rem) 1.75rem 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.fields article:nth-child(3n) { border-right: 0; padding-right: 0; }
.fields article:nth-child(3n+1) { padding-left: 0; }
.fields article:not(:nth-child(3n+1)) { padding-left: clamp(1.25rem, 2.2vw, 2rem); }
.fields h3 { font-size: 1.1875rem; font-weight: 700; }
.fields p { margin: .6rem 0 0; color: var(--ink-2); font-size: .9375rem; }

@media (max-width: 60rem) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields article:nth-child(3n) { border-right: 1px solid var(--rule); padding-right: clamp(1.25rem, 2.2vw, 2rem); }
  .fields article:nth-child(n) { padding-left: clamp(1.25rem, 2.2vw, 2rem); }
  .fields article:nth-child(2n) { border-right: 0; padding-right: 0; }
  .fields article:nth-child(2n+1) { padding-left: 0; }
}
@media (max-width: 40rem) {
  .fields { grid-template-columns: 1fr; }
  .fields article:nth-child(n) { border-right: 0; padding-inline: 0; }
}

/* ---------- for dive centres ---------- */

.centres { padding-block: clamp(3.5rem, 9vw, 6rem); }
.centres-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.centres-grid > div > p {
  margin: 1rem 0 0;
  color: var(--ink-2);
  max-width: 34ch;
}

.uses { list-style: none; margin: 0; padding: 0; }
.uses li {
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule-2);
  color: var(--ink-2);
  max-width: 58ch;
}
.uses li:last-child { border-bottom: 1px solid var(--rule-2); }
.uses b { color: var(--ink); font-weight: 600; }

@media (max-width: 56rem) {
  .centres-grid { grid-template-columns: 1fr; }
}

/* ---------- reviews ---------- */

.reviews {
  background: var(--card);
  border-block: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 9vw, 6rem);
}
.reviews-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.rev { margin: 0; display: grid; }
.rev > div { padding: 1.25rem 0; border-top: 1px solid var(--rule-2); }
.rev > div:last-child { border-bottom: 1px solid var(--rule-2); }
.rev dt {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 700;
}
.rev dd { margin: .4rem 0 0; color: var(--ink-2); max-width: 54ch; }

@media (max-width: 56rem) {
  .reviews-grid { grid-template-columns: 1fr; }
}

/* ---------- closer ---------- */

.closer {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 24rem;
  color: #fff;
}
.closer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.closer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 20, 24, .93) 25%, rgba(6, 20, 24, .6) 58%, rgba(6, 20, 24, .3));
}
.closer-copy {
  position: relative;
  z-index: 5;
  width: 100%;
  padding-block: clamp(3rem, 7vw, 4.5rem);
}
.closer-copy h2 { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem); }
.closer-copy p { margin: 1rem 0 0; max-width: 46ch; color: #d7e2e3; }
.closer .btn-quiet { color: #fff; border-color: rgba(255, 255, 255, .5); }
.closer .btn-quiet:hover { border-color: #fff; }

/* ---------- footer ---------- */

.foot { padding-block: 2rem; font-size: .875rem; color: var(--ink-2); }
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.foot p { margin: 0; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
