/* ==========================================================================
   My Handy Admin
   Single-page site. Four surfaces (white, cream, navy, amber), one display
   serif, one body sans. Rules are used to group content, never to decorate
   the top of a section.
   ========================================================================== */

/* Self-hosted variable fonts. One latin file per family covers every weight. */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/newsreader-latin-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-latin-var.woff2') format('woff2');
}

:root {
  /* Ink and accent */
  --ink: #1F2639;
  --ink-deep: #151A28;
  --amber: #D49644;
  --amber-deep: #B87A28;
  --gold: #D8953F;
  --cream: #F5E7CF;

  /* Surfaces and rules */
  --paper: #FFFFFF;
  --paper-alt: #F5E7CF;
  --rule: #DCE1E8;
  --rule-on-cream: rgba(31, 38, 57, 0.16);

  /* Text */
  --text: #1F2639;
  --text-body: #1F2639;
  --text-muted: #4A5264;
  --text-on-dark: #F5E7CF;
  --text-on-dark-muted: rgba(245, 231, 207, 0.76);

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --fs-micro: 0.75rem;
  --fs-small: 0.8125rem;
  --fs-meta: 0.875rem;
  --fs-ui: 0.9375rem;
  --fs-body: 1.0625rem;

  /* Layout */
  --container: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(64px, 8vw, 112px);
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  font-optical-sizing: auto;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.55rem, 1.2rem + 4vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(2.25rem, 1.35rem + 3.1vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

h3 {
  font-size: clamp(1.25rem, 1.08rem + 0.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.006em;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
}

button {
  font: inherit;
}

::selection {
  background: var(--amber);
  color: var(--ink);
}

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

/* Cream focus rings wherever the surface is ink */
.site-header :focus-visible,
.hero :focus-visible,
.section--dark :focus-visible,
.site-footer :focus-visible,
.legal-header :focus-visible,
.legal-footer :focus-visible {
  outline-color: var(--cream);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0;
  left: var(--gutter);
  z-index: 200;
  transform: translateY(-120%);
  background: var(--cream);
  color: var(--ink);
  padding: 0.75rem 1.1rem;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0.75rem);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
}

.site-header.is-scrolled {
  box-shadow: 0 10px 28px rgba(21, 26, 40, 0.18);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  display: block;
  height: 44px;
  width: auto;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--text-on-dark);
  font-size: var(--fs-ui);
  font-weight: 450;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link[aria-current]::after {
  transform: scaleX(1);
}

.nav-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  color: var(--amber);
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav-mail svg {
  width: 15px;
  height: 15px;
  transition: transform 0.18s ease;
}

.nav-mail:hover svg {
  transform: translateX(3px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(245, 231, 207, 0.3);
  border-radius: 2px;
  color: var(--cream);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--cream);
}

.nav-toggle-box {
  display: grid;
  gap: 4px;
  width: 20px;
}

.nav-toggle-box span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

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

.hero {
  background: var(--ink);
  color: var(--text-on-dark);
  padding-block: clamp(88px, 11vw, 148px);
  scroll-margin-top: var(--header-h);
  text-align: center;
}

.hero-inner {
  max-width: 680px;
  margin-inline: auto;
}

.hero-kicker {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin-top: 1.15rem;
  color: var(--cream);
}

.hero-services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.4rem;
  font-size: var(--fs-ui);
  line-height: 1.6;
  color: var(--text-on-dark-muted);
}

.hero-services li {
  white-space: nowrap;
}

.hero-services li + li::before {
  content: "·";
  margin-inline: 0.55rem;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 8px);
}

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

.section--dark {
  background: var(--ink);
  color: var(--text-on-dark-muted);
}

.section--dark h2,
.section--dark h3 {
  color: var(--cream);
}

.section--cta {
  background: var(--amber);
  color: var(--ink);
}

.section--cta h2,
.section--cta h3 {
  color: var(--ink);
}

.section--cta .section-head h2 {
  max-width: 18ch;
}

/* Heading only. No rule, no paragraph beside it. */
.section-head {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.section-head h2 {
  max-width: 20ch;
}

/* --------------------------------------------------------------------------
   Links and buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn--primary {
  background: var(--amber);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--amber-deep);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--dark {
  background: var(--ink);
  color: var(--cream);
}

.btn--dark:hover {
  background: var(--ink-deep);
}

.btn--dark:active {
  transform: translateY(1px);
}

.btn--sm {
  min-height: 40px;
  padding: 0.55rem 1rem;
  font-size: var(--fs-meta);
}

/* --------------------------------------------------------------------------
   Who I help
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.split h2 {
  max-width: 11ch;
}

.split-body {
  display: grid;
  gap: 2rem;
}

.entry + .entry {
  padding-top: 2rem;
  border-top: 1px solid var(--rule-on-cream);
}

.entry p {
  max-width: 62ch;
  margin-top: 0.6rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Services: a ruled two-column index, no cards
   -------------------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4.5rem);
}

.service {
  padding: 1.5rem 0 1.9rem;
  border-top: 1px solid var(--rule);
}

.service p {
  max-width: 46ch;
  margin-top: 0.45rem;
  font-size: var(--fs-ui);
  line-height: 1.65;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Monthly hours: a single rate table
   -------------------------------------------------------------------------- */

.section-note {
  max-width: 70ch;
  margin-top: 0.9rem;
  font-size: var(--fs-meta);
  line-height: 1.65;
  color: var(--text-muted);
}

.rates {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rates thead th {
  padding: 0 0 0.85rem;
  border-bottom: 1px solid var(--rule-on-cream);
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
}

.rates thead th:not(:first-child) {
  padding-left: 1.5rem;
  text-align: right;
}

.rates tbody th {
  padding: 1.1rem 1rem 1.1rem 0;
  border-top: 1px solid var(--rule-on-cream);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text);
  text-align: left;
}

.rates td {
  padding: 1.1rem 0 1.1rem 1.5rem;
  border-top: 1px solid var(--rule-on-cream);
  text-align: right;
  color: var(--text);
}

.rates td:first-of-type {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.25rem + 0.5vw, 1.6rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.rates td:last-of-type {
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

.rates tbody tr.rates-payg th,
.rates tbody tr.rates-payg td {
  border-top-color: rgba(31, 38, 57, 0.3);
}

.rates tbody tr:last-child th,
.rates tbody tr:last-child td {
  border-bottom: 1px solid var(--rule-on-cream);
}

.pricing-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.pricing-cta p {
  max-width: 56ch;
  font-size: var(--fs-body);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */

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

.step {
  padding-right: clamp(1.5rem, 3vw, 2.5rem);
}

.step + .step {
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 1px solid rgba(245, 231, 207, 0.2);
}

.step p {
  margin-top: 0.6rem;
  font-size: var(--fs-ui);
  line-height: 1.65;
  color: var(--text-on-dark-muted);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: stretch;
}

.about-media {
  margin: 0;
  height: 100%;
}

.about-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-copy p {
  max-width: 60ch;
  color: var(--text-body);
}

.about-copy p + p {
  margin-top: 1.1rem;
}

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

.section--cta ::selection {
  background: var(--ink);
  color: var(--cream);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-grid .section-head {
  margin-bottom: 0;
}

.contact-mail {
  display: inline-block;
  font-size: clamp(1.25rem, 0.85rem + 1.3vw, 1.9rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}

.contact-mail:hover {
  text-decoration-color: var(--ink-deep);
}

.contact-note {
  flex: 1 1 22ch;
  min-width: 22ch;
  max-width: 46ch;
  font-size: var(--fs-ui);
  line-height: 1.65;
  color: var(--ink);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-top: 1.25rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  flex: none;
}

.status {
  min-height: 1.2rem;
  margin-top: 0.75rem;
  font-size: var(--fs-small);
  color: var(--ink);
}

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

.site-footer {
  background: var(--ink-deep);
  color: var(--text-on-dark);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(245, 231, 207, 0.16);
}

.footer-brand img {
  display: block;
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 34ch;
  font-size: var(--fs-ui);
  color: rgba(245, 231, 207, 0.72);
}

.footer-contact h2 {
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}

.footer-contact a {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--cream);
  font-size: var(--fs-meta);
  text-decoration: underline;
  text-decoration-color: rgba(212, 150, 68, 0.6);
  text-underline-offset: 3px;
}

.footer-contact a:hover {
  text-decoration-color: var(--amber);
}

.footer-legal {
  padding-top: 1.25rem;
}

.legal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  font-size: var(--fs-small);
  color: rgba(245, 231, 207, 0.7);
}

.legal-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-list li:not(:last-child)::after {
  content: "|";
  color: rgba(245, 231, 207, 0.32);
}

.legal-list a {
  text-underline-offset: 2px;
}

.legal-list a:hover {
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   Privacy page
   -------------------------------------------------------------------------- */

.legal-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(245, 231, 207, 0.14);
}

.legal-header .header-inner {
  min-height: 68px;
}

.legal-header .brand img {
  height: 38px;
}

.back-link {
  color: var(--cream);
  font-size: var(--fs-ui);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 231, 207, 0.35);
  padding-bottom: 2px;
}

.back-link:hover {
  border-bottom-color: var(--amber);
}

.legal {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.legal-wrap {
  max-width: 700px;
}

.legal h1 {
  font-size: clamp(2.1rem, 1.6rem + 2vw, 3rem);
}

.legal .updated {
  margin-top: 0.6rem;
  font-size: var(--fs-meta);
  color: var(--text-muted);
}

.legal h2 {
  margin-top: 2.4rem;
  font-size: 1.35rem;
}

.legal h2:first-of-type {
  margin-top: 2rem;
}

.legal p,
.legal li {
  margin-top: 0.75rem;
  font-size: 1.0125rem;
  line-height: 1.72;
  color: var(--text-body);
}

.legal ul {
  margin-top: 0.4rem;
  padding-left: 1.15rem;
  list-style: disc;
}

.legal ul li {
  margin-top: 0.4rem;
}

.legal ul li::marker {
  color: var(--amber);
}

.legal a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.legal a:hover {
  text-decoration-color: var(--ink);
}

.legal-footer {
  background: var(--ink-deep);
  color: rgba(245, 231, 207, 0.7);
  font-size: var(--fs-small);
  padding-block: 1.5rem;
}

.legal-footer a {
  color: var(--cream);
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--ink-deep);
    border-top: 1px solid rgba(245, 231, 207, 0.14);
  }

  .js .nav.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.6rem 0;
    font-size: var(--fs-body);
  }

  .nav-link::after {
    display: none;
  }

  .nav-mail {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(245, 231, 207, 0.16);
  }

  .section-head h2 {
    max-width: 22ch;
  }

  .split,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .split h2 {
    max-width: 20ch;
  }

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

  .step {
    padding: 1.5rem 0;
  }

  .step + .step {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(245, 231, 207, 0.2);
  }

  .about-grid {
    align-items: start;
  }

  .about-media {
    height: auto;
  }

  .about-photo {
    width: min(100%, 300px);
    height: auto;
    object-position: center;
  }
}

@media (max-width: 720px) {
  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }
}

@media (max-width: 560px) {
  .rates thead {
    display: none;
  }

  .rates,
  .rates tbody {
    display: block;
  }

  .rates tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    padding-block: 1rem;
    border-top: 1px solid var(--rule-on-cream);
  }

  .rates tbody tr.rates-payg {
    border-top-color: rgba(31, 38, 57, 0.3);
  }

  .rates tbody tr:last-child {
    border-bottom: 1px solid var(--rule-on-cream);
  }

  .rates tbody tr > * {
    display: block;
    padding: 0;
    border: 0;
    text-align: left;
  }

  .rates tbody th {
    grid-column: 1 / -1;
    font-size: var(--fs-body);
  }

  .rates td:first-of-type {
    font-size: 1.25rem;
  }

  .rates td:last-of-type {
    align-self: end;
    text-align: right;
  }

  .contact-actions {
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
