/* =========================================================
   Kernow Pages — site styles
   Palette, type and layout tokens live at the top.
   Change a colour here and it changes everywhere.
   ========================================================= */

:root {
  /* Cornwall's own two colours. St Piran's flag is a white cross on black;
     this site runs it the bright way round — mostly white, with black
     doing all the work. Change --ink and the whole site follows. */
  --ink:        #000000;   /* text, buttons, dark sections */
  --ink-soft:   #141414;   /* panels sitting inside dark sections */
  --paper:      #FFFFFF;   /* page background */
  --white:      #FFFFFF;
  --chalk:      #F4F4F2;   /* softest off-white fill */
  --stone:      #DCDCD8;   /* light grey — rules, edges, quiet fills */
  --slate:      #6E6E6E;   /* mid grey — secondary text */

  /* Accents. Headings, titles and the dark sections stay black and white —
     that's the Cornish bit. Colour is for the things you click, and the
     small stuff that gives the page some life. */
  --gold:       #E8A317;   /* primary action — dark type sits on it, not white */
  --sea:        #0E7C86;   /* links and rules — dark enough to read on white */
  --sun:        #FFC531;   /* highlights */
  --mint:       #6FE7C1;   /* soft fills and ticks */

  --ink-60: rgba(0, 0, 0, 0.62);
  --ink-12: rgba(0, 0, 0, 0.12);

  /* Type — two families, no more. One for headings, one for everything else. */
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 22px;
  --radius-lg: 34px;

  --shadow-soft: 0 18px 40px -24px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.14rem);
  font-weight: 350;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5rem); }
h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem); }

p { margin: 0 0 1.1em; max-width: 68ch; }

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

.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.section--dark {
  background: var(--ink);
  color: var(--white);
}
.section--dark p { color: rgba(255,255,255,0.78); }

.lede {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink-60);
  max-width: 56ch;
}
.section--dark .lede { color: rgba(255,255,255,0.8); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(244, 248, 252, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--ink-12);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 34px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}
/* ---------- Kernewek ----------
   The odd line of Cornish, with its English underneath. Used sparingly —
   the hero, the footer, and one or two section headings. Not everywhere. */

.kernewek {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 0.6rem;
}
.kernewek i {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.75;
}
.kernewek i::before { content: " ·  "; }
.section--dark .kernewek { color: rgba(255,255,255,0.55); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.9rem);
}
.nav a {
  text-decoration: none;
  font-size: 1rem;
  padding: 0.3rem 0;
  position: relative;
  color: var(--ink);
}
/* .nav a would otherwise win on specificity and paint the button's label
   black on black. The button keeps its own foreground. */
.nav a.btn { color: var(--btn-fg); padding: 0.85rem 1.6rem; }
.nav a.btn::after { display: none; }

.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--sun);
  transition: right .28s ease;
}
.nav a:hover::after,
.nav a:focus-visible::after { right: 0; }
.nav a[aria-current="page"]::after { right: 0; background: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    padding: 0.5rem var(--gutter) 1.5rem;
    box-shadow: var(--shadow-soft);
    transform: translateY(-120%);
    transition: transform .38s cubic-bezier(.3,.9,.3,1);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--ink-12); font-size: 1.15rem; }
  .nav .btn { margin-top: 1rem; text-align: center; border-bottom: 0; }
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.3,.9,.3,1), box-shadow .22s ease;
  box-shadow: 0 12px 26px -14px rgba(232, 163, 23, 0.9);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .34s cubic-bezier(.3,.9,.3,1);
}
/* The black fill rises on hover, so the label has to flip to white or it
   vanishes against it. Variants that fill with something light — the ghost
   button on a dark section, and the inverted button — set it back below. */
.btn:hover, .btn:focus-visible { transform: translateY(-3px); --btn-fg: #fff; }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink-12);
}
/* Outlined on white; the black fill rises on hover so the label turns white. */
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover, .btn--ghost:focus-visible { --btn-fg: #fff; }

.section--dark .btn--ghost {
  --btn-fg: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.28);
}
/* On black it inverts: white fill rises, label turns black. */
.section--dark .btn--ghost::before { background: #fff; }
.section--dark .btn--ghost:hover, .section--dark .btn--ghost:focus-visible { --btn-fg: var(--ink); }

/* The inverted button — white on black, for use inside dark sections. */
.btn--invert { --btn-bg: #fff; --btn-fg: var(--ink); box-shadow: 0 12px 26px -14px rgba(0,0,0,.7); }
.btn--invert::before { background: var(--stone); }
.btn--invert:hover, .btn--invert:focus-visible { --btn-fg: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 { max-width: 12ch; }
.hero h1 .swash {
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-style: italic;
  color: var(--ink);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
.glow--a { width: 46vw; height: 46vw; background: rgba(111, 231, 193, 0.5); top: -18vw; right: -10vw; animation: drift 22s ease-in-out infinite; }
.glow--b { width: 34vw; height: 34vw; background: rgba(255, 197, 49, 0.42); bottom: -16vw; left: -8vw; animation: drift 28s ease-in-out infinite reverse; }

@keyframes drift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(3vw, 4vw, 0) scale(1.12); }
}

/* Browser mock */

.mock {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--chalk);
}
.mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--stone); }
.mock__url {
  margin-left: 0.6rem;
  flex: 1;
  background: #fff;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock__page { padding: 1.6rem 1.5rem 2rem; }
.mock__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-60);
  margin-bottom: 1.4rem;
}
.mock__logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.mock__title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
  min-height: 1.1em;
}
.mock__title .caret {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  background: var(--ink);
  vertical-align: -0.1em;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.mock__line { height: 9px; border-radius: 6px; background: var(--stone); margin-bottom: 0.55rem; }
.mock__line.short { width: 62%; }
.mock__cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.85rem;
}
.mock__strip { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
/* The mock is standing in for the visitor's own site, so it gets a bit of
   colour — a grey rectangle sells nothing. */
.mock__strip span { flex: 1; height: 44px; border-radius: 12px; background: var(--chalk); }
.mock__strip span:nth-child(1) { background: rgba(111, 231, 193, 0.55); }
.mock__strip span:nth-child(2) { background: rgba(255, 197, 49, 0.55); }
.mock__strip span:nth-child(3) { background: rgba(14, 124, 134, 0.18); }

.namefield {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}
.namefield label { font-size: 0.95rem; color: var(--ink-60); }
.namefield input {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--ink-12);
  background: var(--white);
  color: var(--ink);
}
.namefield input:focus-visible {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(14,124,134,0.18);
}

/* ---------- Marquee ---------- */

.marquee {
  background: var(--ink);
  color: var(--white);
  padding: 0.9rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  gap: 3rem;
  animation: slide 32s linear infinite;
  font-family: var(--font-head);
  font-size: 1.1rem;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 3rem; }
.marquee__track b { font-weight: 600; color: var(--sea); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Cards / grids ---------- */

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-soft);
}
.card h3 { margin-bottom: 0.35rem; }
.card p { margin-bottom: 0; color: var(--ink-60); }

.service {
  border-top: 5px solid var(--sea);
}
/* Three cards, three clearly different rules. The light gold sat too close
   to the deep gold when they were side by side. */
.service:nth-child(2) { border-top-color: var(--gold); }
.service:nth-child(3) { border-top-color: var(--mint); }
.service:nth-child(4) { border-top-color: var(--sun); }

/* Work cards */

.work-card {
  display: block;
  text-decoration: none;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .3s cubic-bezier(.3,.9,.3,1), box-shadow .3s ease;
}
.work-card:hover, .work-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}
/* Real screenshots of the real sites, each in its own colours. */
.work-card__thumb {
  display: block;
  width: 100%;
  /* The img's height attribute lands as a presentational hint and would
     otherwise beat aspect-ratio, so it has to be reset explicitly. */
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--chalk);
  border-bottom: 1px solid var(--ink-12);
  transition: transform .6s cubic-bezier(.3,.9,.3,1);
}
.work-card:hover .work-card__thumb,
.work-card:focus-visible .work-card__thumb {
  transform: scale(1.04);
}
.work-card__body { padding: 1.3rem 1.5rem 1.6rem; }
.work-card__body h3 { margin-bottom: 0.2rem; }
.work-card__meta { font-size: 0.9rem; color: var(--ink-60); margin: 0 0 0.7rem; }
.work-card__link { font-weight: 500; color: var(--sea); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.tags span {
  font-size: 0.82rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(14, 124, 134, 0.12);
  color: var(--ink);
}

/* ---------- Pricing ---------- */

/* ---------- Billing toggle ----------
   Deliberately large and obvious: people miss the monthly option otherwise.
   The black pill slides between the two, so the switch is visible rather
   than just a colour change. */

.billing {
  text-align: center;
  margin-bottom: 2.6rem;
}
.billing__lead {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 0.9rem;
}
.toggle {
  position: relative;
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-soft);
}
.toggle__thumb {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 6px);
  height: calc(100% - 12px);
  border-radius: 999px;
  background: var(--ink);
  z-index: 0;
  transition: transform .42s cubic-bezier(.34, 1.4, .5, 1);
}
.toggle[data-mode="monthly"] .toggle__thumb { transform: translateX(100%); }
.toggle button {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  white-space: nowrap;
  border: 0;
  background: none;
  font: inherit;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem);
  font-weight: 500;
  padding: 0.75rem 1.7rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-60);
  transition: color .3s ease;
}
.toggle button[aria-pressed="true"] { color: #fff; }
.toggle button:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

/* The price itself flips rather than just swapping, so the change registers. */
.price-value.is-swapping { opacity: 0; transform: translateY(-8px); }

/* Aftercare sits under the price, because it's the question everyone asks. */
.plan__aftercare {
  margin: 0.2rem 0 0.4rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: var(--chalk);
  border: 1px solid var(--ink-12);
  font-size: 0.9rem;
  line-height: 1.45;
}
.plan__aftercare strong { font-weight: 600; }
.plan__aftercare--none {
  background: transparent;
  border-style: dashed;
}

.plan {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan--featured {
  box-shadow: var(--shadow-lift);
  outline: 3px solid var(--gold);
}
.plan__flag {
  position: absolute;
  top: -14px;
  left: clamp(1.5rem, 3vw, 2.2rem);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.82rem;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
}
.plan__price {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3rem);
  line-height: 1;
  margin: 0.6rem 0 0.2rem;
}
.plan__price small {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-60);
}
.plan__note { font-size: 0.92rem; color: var(--ink-60); min-height: 2.6em; }
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; }
.plan li {
  padding-left: 1.7rem;
  position: relative;
  margin-bottom: 0.6rem;
  line-height: 1.45;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--mint);
}
.plan .btn { margin-top: auto; }

.price-value { transition: opacity .2s ease, transform .2s ease; display: inline-block; }

.table-wrap { overflow-x: auto; }
table.addons {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  /* The table sits inside a dark section, which sets colour to white.
     Without this the white text lands on the white table and vanishes. */
  color: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-width: 460px;
}
table.addons th, table.addons td {
  text-align: left;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--ink-12);
}
table.addons th { font-weight: 500; background: rgba(14, 124, 134, 0.1); }
table.addons tr:last-child td { border-bottom: 0; }
table.addons td:last-child { white-space: nowrap; font-weight: 500; }

/* Same guard for any white panel used inside a dark section. */
.section--dark .card:not([style*="background"]),
.section--dark .faq details { color: var(--ink); }

/* ---------- FAQ ---------- */

.faq details {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.9rem;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  transition: transform .28s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.9rem 0 0.3rem; color: var(--ink-60); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; display: grid; gap: 1.2rem; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: start;
}
.step:nth-child(2) .step__num { background: var(--sun); color: var(--ink); }
.step:nth-child(3) .step__num { background: var(--gold); color: var(--ink); }
.step:nth-child(4) .step__num { background: var(--mint); color: var(--ink); }

.step__num {
  counter-increment: step;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sea);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
}

.step__num::before { content: counter(step); }
.step h3 { margin-bottom: 0.2rem; }
.step p { margin: 0; color: var(--ink-60); }

/* ---------- Forms ---------- */

.form { display: grid; gap: 1.1rem; max-width: 620px; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.95rem; font-weight: 500; }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 0.85rem 1.05rem;
  border-radius: 16px;
  border: 2px solid var(--ink-12);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: none;
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(14,124,134,0.18);
}
.form-note { font-size: 0.92rem; color: var(--ink-60); }
.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  background: rgba(111,231,193,0.28);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--error { background: rgba(255, 90, 90, 0.18); }

/* Honeypot. Off-screen rather than display:none — bots skip hidden fields. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn:disabled:hover { transform: none; }
.btn:disabled:hover::before { transform: translateY(101%); }

/* ---------- Contact details ---------- */

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.contact-list a { color: var(--sea); text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.contact-list strong { display: block; font-weight: 500; font-size: 0.95rem; color: var(--ink-60); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .brand { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: rgba(255,255,255,0.55); margin-bottom: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
}

/* ---------- Motion ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 12px 0;
  z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* ---------- Tagline ----------
   The motto sits above the headline on the home page and reads as a label,
   not a sentence, so it doesn't compete with the h1. */

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--ink);
  display: inline-block;
}
.hero .kernewek { margin-top: -0.4rem; margin-bottom: 1.1rem; }

/* ---------- Thank-you dialog ----------
   Native <dialog>, so Escape and the focus trap are handled by the browser.
   Sized off the viewport so it behaves on a phone as well as a desktop. */

.thanks {
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  overflow: auto;
}
.thanks::backdrop { background: rgba(0, 0, 0, 0.58); }
.thanks__inner {
  padding: clamp(1.6rem, 6vw, 2.6rem);
  text-align: center;
}
.thanks__mark { width: 72px; height: auto; margin-bottom: 0.7rem; }
.thanks h2 { margin: 0; }
.thanks .kernewek { margin-top: 0.35rem; }
.thanks__lead { margin: 1rem 0 0.8rem; }
.thanks__note { font-size: 0.92rem; color: var(--ink-60); margin: 0 0 1.6rem; }
.thanks .btn { width: 100%; }

/* A short, quiet entrance — and none at all for anyone who asked for less. */
@media (prefers-reduced-motion: no-preference) {
  .thanks[open] { animation: thanks-in .26s cubic-bezier(.3, .9, .3, 1); }
  @keyframes thanks-in {
    from { opacity: 0; transform: translateY(10px); }
  }
}

/* ---------- Touch screens ----------
   A phone has no pointer to hover with, but tapping still latches :hover —
   so a card you touched stays lifted and zoomed until you tap something
   else. Nothing should move just because someone put a finger on it.
   Colour changes stay; they read as a tap acknowledgement rather than
   something sliding about. */

@media (hover: none) {
  .btn:hover { transform: none; }
  .work-card:hover { transform: none; box-shadow: var(--shadow-soft); }
  .work-card:hover .work-card__thumb { transform: none; }
  .nav a:hover::after { right: 100%; }
  .service:hover, .plan:hover, .card:hover { transform: none; }
}

/* ---------- Add-ons table on a phone ----------
   Two columns inside a 460px minimum meant the table could only be read by
   dragging it sideways. Below 560px each row becomes a stacked block — the
   add-on on one line, the price under it — so it reads straight down with
   no sideways scrolling and the header row becomes redundant. */

@media (max-width: 560px) {
  table.addons {
    min-width: 0;
    display: block;
    padding: 0.4rem 0.2rem;
  }
  table.addons thead { display: none; }
  table.addons tbody,
  table.addons tr,
  table.addons td { display: block; width: 100%; }
  table.addons tr {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--ink-12);
  }
  table.addons tr:last-child { border-bottom: 0; }
  table.addons td { padding: 0; border: 0; }
  table.addons td:first-child { font-weight: 500; }
  table.addons td:last-child {
    white-space: normal;
    font-weight: 400;
    color: var(--ink-60);
    margin-top: 0.15rem;
  }
}

/* ---------- About page portrait ----------
   Holding the shape a photo will eventually fill, so the page doesn't
   reflow when one arrives. Same 4:5 card, logo centred inside it. */

.portrait {
  aspect-ratio: 4 / 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.2rem;
  text-align: center;
  background: var(--chalk);
  border: 1px solid var(--ink-12);
}
.portrait__mark {
  width: min(180px, 46%);
  height: auto;
  margin-bottom: 0.6rem;
}
.portrait__name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  letter-spacing: -0.02em;
}
.portrait .kernewek { margin-top: 0.15rem; }
