/* ==========================================================================
   Design tokens
   Colours were sampled by eye from the supplied designs and logo.
   ========================================================================== */

:root {
  --black: #0a0a0a;
  --charcoal: #141414;
  --graphite: #1f1f1f;
  --line: #333;
  --line-soft: #3a3a3a;
  --white: #f5f5f5;
  --text-soft: #d4d4d4;
  --text-muted: #cfcfcf;
  --grey: #a3a3a3;
  --red: #e0262b;
  --red-dark: #b81d21;
  --danger: #ff6b6b;
  --success: #7ddc8a;

  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;

  --radius: 6px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(56px, 8vw, 112px);
  --header-h: 64px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

/* Elements hidden with the hidden attribute stay hidden even if a class sets display */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

figure,
ul {
  margin: 0;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  overflow-wrap: anywhere;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

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

.red {
  color: var(--red);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.7em 1.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-ghost {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--black);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 10px
    max(var(--gutter), env(safe-area-inset-right))
    10px
    max(var(--gutter), env(safe-area-inset-left));
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--graphite);
}

/* The logo has a black background; "screen" blending makes it blend into the dark header. */
.logo {
  display: inline-flex;
  flex-shrink: 0;
}

.logo img {
  width: clamp(160px, 15vw, 190px);
  height: auto;
  mix-blend-mode: screen;
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 2.5vw, 28px);
  min-width: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.4vw, 32px);
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.25s;
}

.site-nav a:hover::after {
  width: 100%;
}

/* Language switcher */

.lang {
  position: relative;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.lang-btn:hover {
  border-color: var(--white);
}

.caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--white);
}

.flag {
  display: inline-flex;
  line-height: 0;
}

.flag svg {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 130px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--charcoal);
  border: 1px solid var(--graphite);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 110;
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-menu li:hover,
.lang-menu li:focus-visible {
  background: var(--graphite);
}

.lang-menu li[aria-selected="true"] {
  color: var(--red);
}

/* Burger button: hidden on desktop, shown on smaller screens (see media queries below) */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 0 auto;
  background: var(--white);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(88svh, 860px);
  padding: var(--section-pad) max(var(--gutter), env(safe-area-inset-left));
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.95) 30%, rgba(10, 10, 10, 0.55) 100%),
    repeating-linear-gradient(90deg, #161616 0 2px, transparent 2px 120px),
    #0d0d0d;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -30%;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 38, 43, 0.25), transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  min-width: 0;
}

.eyebrow {
  margin-bottom: 1.2em;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--grey);
}

.hero h1 {
  display: flex;
  flex-direction: column;
  gap: 0.05em;
  margin-bottom: 0.4em;
  font-size: clamp(3.2rem, 11vw, 7.5rem);
}

.line-white {
  color: var(--white);
}

.line-red {
  color: var(--red);
}

.hero-text {
  max-width: 520px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1.6em 0;
}

.offer-badge {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 8px 14px;
  border-left: 3px solid var(--red);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: var(--section-pad) 0;
}

.section-alt {
  background: var(--charcoal);
}

.section-title {
  margin-bottom: 0.3em;
  font-size: clamp(2rem, 8.5vw, 3.4rem);
}

.section-intro {
  margin-bottom: 2rem;
  color: var(--grey);
}

/* ==========================================================================
   Services and prices
   ========================================================================== */

.plans-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--graphite);
  border-top: 4px solid var(--white);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--red);
}

.plan-card h3 {
  margin-bottom: 0.6em;
  font-size: 1.6rem;
}

.plan-desc {
  flex-grow: 1;
  color: var(--text-muted);
}

.plan-featured {
  border-top-color: var(--red);
}

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0.4em 0 0.6em;
}

.price-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 1.2em;
  padding: 6px 10px;
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
  color: var(--text-soft);
}

.price-offer strong {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.price-now {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
}

.price-unit {
  font-size: 0.95rem;
  color: var(--grey);
}

.info-list {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  list-style: none;
  padding: 0;
  margin: 2.5em 0 1em;
}

.info-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  background: var(--red);
  transform: rotate(45deg);
}

.fine-print {
  font-size: 0.85rem;
  color: var(--grey);
}

/* ==========================================================================
   About
   ========================================================================== */

.about-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

/* Photo slot: place the file at assets/david.jpg (portrait, about 4:5). */
.about-photo {
  position: relative;
  width: 100%;
  max-height: 70vh;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  border-left: 6px solid var(--red);
  background: linear-gradient(160deg, #262626, #0d0d0d 70%);
}

.about-photo img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
}

.about-photo.no-img img {
  display: none;
}

.about-text {
  min-width: 0;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-soft);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  list-style: none;
  padding: 0;
  margin: 1.8em 0 0;
}

.stats li {
  display: flex;
  flex-direction: column;
}

.stats strong {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--red);
}

.stats span {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ==========================================================================
   Media: social tiles
   ========================================================================== */

.social-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(20px, 6vw, 56px);
}

.social-item {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.social-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: clamp(120px, 36vw, 200px);
  aspect-ratio: 1 / 1;
  border-radius: 26%;
  background: linear-gradient(145deg, #ff4a4f 0%, #e0262b 45%, #a8141a 100%);
  color: var(--white);
  text-decoration: none;
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.35),
    inset 0 -14px 22px rgba(0, 0, 0, 0.28),
    0 22px 30px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.25s, box-shadow 0.25s;
}

/* Glossy highlight for the 3D look */
.social-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 75% at 28% 8%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.social-tile svg {
  width: 52%;
  height: 52%;
  overflow: visible;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}

.social-tile svg * {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-tile:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.35),
    inset 0 -14px 22px rgba(0, 0, 0, 0.28),
    0 30px 36px -10px rgba(0, 0, 0, 0.75);
}

.social-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr);
}

.contact-info p {
  color: var(--text-soft);
}

.contact-details {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 1.5em 0 0;
}

.contact-details a {
  color: var(--red);
  overflow-wrap: anywhere;
}

.intake {
  margin-top: 2rem;
  padding: 20px;
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.intake h3 {
  margin-bottom: 0.4em;
  font-size: 1.5rem;
}

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

.intake .btn {
  width: 100%;
}

.contact-form {
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 4vw, 36px);
  background: var(--graphite);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
}

.form-row {
  display: grid;
  gap: 0 18px;
  grid-template-columns: minmax(0, 1fr);
}

.field {
  min-width: 0;
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--white) 50%),
    linear-gradient(135deg, var(--white) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 38, 43, 0.25);
}

.field .error {
  display: block;
  min-height: 1.1em;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--danger);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
}

/* Honeypot: hidden from people, visible to bots that fill every field */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacy-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
  color: var(--grey);
}

.form-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  text-align: center;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--danger);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 18px
    max(var(--gutter), env(safe-area-inset-right))
    18px
    max(var(--gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--graphite);
  text-align: right;
}

.site-footer .dev-credit {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--grey);
}

.site-footer .dev-credit strong {
  font-weight: 700;
  color: var(--red);
}

/* ==========================================================================
   Responsive layout
   Breakpoints: 380px (small phones), 600px (tablets portrait),
   860px (two-column sections), 960px (desktop navigation),
   1024px (four plan cards). Landscape phones use the compact rules at the end.
   ========================================================================== */

@media (min-width: 600px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .intake .btn {
    width: auto;
  }
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 56px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .plans-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Mobile and tablet navigation: burger button with a full-width dropdown */
@media (max-width: 959.98px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow-y: auto;
    visibility: hidden;
    background: var(--charcoal);
    border-bottom: 1px solid var(--graphite);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
    transition: max-height 0.3s ease, visibility 0.3s;
  }

  .site-nav.open {
    max-height: 80vh;
    visibility: visible;
  }

  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 max(var(--gutter), env(safe-area-inset-left));
    border-top: 1px solid var(--graphite);
    font-size: 1.2rem;
  }

  .site-nav a::after {
    display: none;
  }
}

/* Small phones in portrait */
@media (max-width: 380px) {
  .hero-actions .btn {
    width: 100%;
  }

  .price-now {
    font-size: 2rem;
  }

  .lang-btn {
    padding: 6px 8px;
  }

  .site-header {
    gap: 10px;
  }
}

/* Landscape phones and other short screens: tighter spacing so nothing is cut off */
@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --header-h: 54px;
    --section-pad: 48px;
  }

  .logo img {
    width: 130px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    margin-bottom: 0.2em;
    font-size: clamp(2.6rem, 10vh, 4.2rem);
  }

  .eyebrow {
    margin-bottom: 0.6em;
  }

  .hero-actions {
    margin: 1em 0;
  }

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

  .plan-card {
    padding: 18px;
  }

  .about-photo {
    max-height: 60vh;
  }

  .contact-form {
    padding: 18px 20px;
  }

  .field {
    margin-bottom: 10px;
  }

  .field textarea {
    min-height: 90px;
  }

  .btn {
    min-height: 44px;
  }
}

/* Wide landscape phones and short tablets can use the side-by-side layouts */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 740px) {
  .plans-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
  }

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

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
