/* ==========================================================================
   Garden Island Contractors — Design System v2
   Shared by the public website and the internal app. Load first.
   Palette: warm paper, ink, koa, moss. Brand navy retained for the logo.
   ========================================================================== */

:root {
  /* --- Surfaces ----------------------------------------------------- */
  --paper:     #f5f2ec;
  --paper-2:   #ece7dd;
  --paper-3:   #e2dccf;
  --white:     #fbfaf7;
  --night:     #15181c;
  --night-2:   #1d2126;

  /* --- Ink ---------------------------------------------------------- */
  --ink:       #1b1b19;
  --ink-2:     #45443f;
  --mute:      #645f57;   /* AA on paper and paper-2 */
  --line:      #d9d3c7;
  --line-dark: rgba(255,255,255,.14);

  /* --- Accents ------------------------------------------------------ */
  --koa:       #7a4e2d;
  --koa-2:     #9c6a44;
  --moss:      #4b5c49;
  --navy:      #1b2f5c;   /* brand logo blue — logo & footer only */

  /* --- Status (app) ------------------------------------------------- */
  --ok:        #2f6b45;  --ok-bg:   #e4efe6;
  --warn:      #8f5f0c;  --warn-bg: #f6ecd6;
  --risk:      #9b2f27;  --risk-bg: #f5e2df;

  /* --- Type --------------------------------------------------------- */
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --fs-label: 0.72rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.375rem;

  /* --- Rhythm ------------------------------------------------------- */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px; --s10: 160px;

  --wrap: 1280px;
  --measure: 34em;
  --ease: cubic-bezier(.22,.61,.36,1);
  --r: 2px;
}

/* --- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; line-height: 1.05; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s4); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: #d8c9b5; color: var(--ink); }

/* --- Type scale ----------------------------------------------------- */
.t-display { font-size: clamp(2.6rem, 6.2vw, 5.4rem); line-height: .98; }
.t-h1      { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.t-h2      { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.t-h3      { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.t-lead    { font-family: var(--serif); font-size: clamp(1.35rem, 2.3vw, 2.05rem); line-height: 1.32; color: var(--ink); }
.t-body-lg { font-size: var(--fs-md); line-height: 1.65; }
.t-small   { font-size: var(--fs-sm); }
.label {
  font-family: var(--sans); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
}
.label--ink { color: var(--ink); }
.label--light { color: rgba(255,255,255,.72); }
.serif { font-family: var(--serif); }
.ital { font-style: italic; }
.measure { max-width: var(--measure); }

/* --- Layout --------------------------------------------------------- */
.wrap   { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.wrap-n { width: min(100% - 3rem, 860px); margin-inline: auto; }
@media (max-width: 640px) { .wrap, .wrap-n { width: min(100% - 2.5rem, var(--wrap)); } }
.sec    { padding: var(--s9) 0; }
.sec--lg{ padding: var(--s10) 0; }
.sec--sm{ padding: var(--s8) 0; }
@media (max-width: 800px) { .sec { padding: var(--s8) 0; } .sec--lg { padding: var(--s9) 0; } .sec--sm { padding: var(--s7) 0; } }
.sec--night { background: var(--night); color: rgba(255,255,255,.78); }
.sec--night h1, .sec--night h2, .sec--night h3, .sec--night .t-lead { color: #fff; }
.sec--white { background: var(--white); }
.sec--paper2 { background: var(--paper-2); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.sec--night .rule { border-color: var(--line-dark); }

.grid { display: grid; gap: var(--s6); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* --- Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: var(--fs-sm); font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 16px 26px; border: 1px solid var(--ink); border-radius: var(--r);
  color: var(--ink); background: transparent; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:focus-visible { outline: 2px solid var(--koa); outline-offset: 3px; }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--koa); border-color: var(--koa); color: #fff; }
.btn--light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light-solid { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light-solid:hover { background: transparent; color: #fff; }
.btn .arr { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
  transition: gap .25s var(--ease), color .25s var(--ease);
}
.link:hover { gap: 16px; color: var(--koa); }
.link--light { color: #fff; }
.link--light:hover { color: #fff; }

/* --- Forms (shared with app) ---------------------------------------- */
.field { margin-bottom: var(--s5); }
.field label { display: block; font-size: var(--fs-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 0; font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  transition: border-color .2s var(--ease);
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field textarea { resize: vertical; min-height: 120px; }
.field .hint { font-size: var(--fs-sm); color: var(--mute); margin-top: 6px; }

/* --- Tables (app) --------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); font-weight: 500; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 10px; border-bottom: 1px solid var(--line); color: var(--ink); }

/* --- Status pills (app) --------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); letter-spacing: .1em; text-transform: uppercase; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--risk { background: var(--risk-bg); color: var(--risk); }

/* --- Utilities ------------------------------------------------------ */
.center { text-align: center; }
.mt-2 { margin-top: var(--s2); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); } .mt-6 { margin-top: var(--s6); } .mt-7 { margin-top: var(--s7); } .mt-8 { margin-top: var(--s8); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--s4); } .mb-5 { margin-bottom: var(--s5); } .mb-6 { margin-bottom: var(--s6); } .mb-7 { margin-bottom: var(--s7); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Reveal-on-scroll (subtle) -------------------------------------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .1s; } .rv-d2 { transition-delay: .2s; } .rv-d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
