/* ==========================================================================
   Once Upon A Coconut — website styles
   Built to the OUAC Style & Layout Guide.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */

@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/young-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/young-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/comfortaa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/comfortaa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  /* Colour — carried over from the profile */
  --moss: #3C5D34;          /* Primary: logo, headings, buttons, links, focus, closing band, footer */
  --amber: #FFB922;         /* Accent: decorative only — rules, dots, link underlines */
  --charcoal: #2B2B2B;      /* Body text */
  --grey: #6B6B6B;          /* Secondary: short labels, captions, small print */

  /* Colour — new for the web */
  --cream: #FAF6EE;         /* Main background; also text on Moss */
  --sand: #F2ECE0;          /* Alternate section bands */
  --pale-moss: #E8EDE0;     /* One highlight panel (Revenue Sharing) */
  --hairline: #DDD5C6;      /* Table rules, borders, form outlines */
  --hairline-on-moss: #587752; /* Footer hairline: a slightly lighter shade of Moss */

  /* Type — three sizes, scaled for screen (mobile → desktop) */
  --fs-heading: clamp(1.875rem, 1.45rem + 1.4vw, 2.5rem);     /* 30px → 40px */
  --fs-subheading: clamp(1.1875rem, 1.1rem + 0.3vw, 1.375rem); /* 19px → 22px */
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);          /* 16px → 17px */
  /* The single larger fluid size, used once: the landing statement */
  --fs-statement: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);

  --font-serif: "Young Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Comfortaa", ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --column: 42rem;          /* ~672px centred text column */
  --frame: 68.75rem;        /* ~1100px outer frame */
  --gutter: 1.5rem;         /* 24px minimum side margin on mobile */
  --section-space: clamp(4rem, 2.2rem + 5.6vw, 7.5rem); /* 64px mobile → 120px desktop */
  --radius: 4px;
  --header-height: 4.5rem;

  /* Motion */
  --fade-duration: 550ms;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--moss);
  line-height: 1.2;
  text-wrap: balance;
}

h1,
h2 {
  font-size: var(--fs-heading);
}

h3,
.subheading {
  font-size: var(--fs-subheading);
  line-height: 1.35;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 700;
}

a {
  color: inherit;
}

/* Focus: Moss on Cream and Sand */
:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--moss);
  color: var(--cream);
  border-radius: var(--radius);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline-color: var(--cream);
}

/* ---------- Layout primitives ---------- */

.frame {
  width: 100%;
  max-width: calc(var(--frame) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.column {
  width: 100%;
  max-width: calc(var(--column) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-space);
}

.band-cream {
  background: var(--cream);
}

.band-sand {
  background: var(--sand);
}

.band-moss {
  background: var(--moss);
  color: var(--cream);
}

/* Vertical rhythm inside a column */
.flow > * + * {
  margin-top: 1.25em;
}

.flow > h3,
.flow > .subheading {
  margin-top: 3rem;
}

.flow > h3 + *,
.flow > .subheading + * {
  margin-top: 1rem;
}

/* ---------- Amber rule (divider) ---------- */

.rule {
  display: block;
  width: 56px;
  height: 2px;
  background: var(--amber);
  border: 0;
  margin: 0 0 1.5rem;
}

.section-heading {
  margin-bottom: 2rem;
}

/* ---------- Amber dot bullets ---------- */

.dots > li {
  position: relative;
  padding-left: 1.5rem;
}

.dots > li + li {
  margin-top: 0.75rem;
}

.dots > li::before {
  content: "";
  position: absolute;
  left: 0.125rem;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
}

.site-header .frame {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  padding-block: 0.5rem;
}

.brand img {
  width: auto;
  height: 2.5rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.75rem);
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--charcoal);
  text-decoration: none;
  white-space: nowrap;
}

/* Short amber underline on hover */
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 1.5rem;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after,
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* The one button style: Moss fill, Cream text */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  background: var(--moss);
  color: var(--cream);
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 300ms ease;
}

.button:hover {
  background: #33502c;
}

/* Secondary action: plain text with amber underline */
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  background: none;
  border: 0;
  color: var(--charcoal);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  cursor: pointer;
  transition: text-decoration-thickness 200ms ease;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration-thickness: 2px;
}

.menu-toggle {
  display: none;
}

@media (max-width: 48rem) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
  }

  .nav-list[hidden] {
    display: none;
  }

  .nav-list li + li {
    border-top: 1px solid var(--hairline);
  }

  .nav-list a {
    display: flex;
    min-height: 3rem;
  }

  .nav-list a::after {
    bottom: 8px;
  }
}

/* Without JavaScript the menu cannot open, so show the links in a wrapping row */
.no-js .menu-toggle {
  display: none;
}

@media (max-width: 48rem) {
  .no-js .site-header .frame {
    flex-wrap: wrap;
  }

  .no-js .nav-list,
  .no-js .nav-list[hidden] {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 1.25rem;
    padding: 0 0 0.75rem;
    border: 0;
  }

  .no-js .nav-list li + li {
    border: 0;
  }
}

@media (max-width: 30rem) {
  .brand img {
    height: 2.125rem;
  }

  .site-header .button {
    padding-inline: 1rem;
  }
}

/* ---------- Landing ---------- */

.landing {
  text-align: center;
}

.statement {
  font-size: var(--fs-statement);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.statement-follow {
  margin-top: 1.25rem;
}

.landing .intro {
  margin-top: 2.5rem;
}

.cover {
  margin-top: clamp(3rem, 2rem + 4vw, 5rem);
}

/* The cover illustration is drawn on off-white paper. Multiply lets the paper
   take on the Cream page colour, and feathered edges stop it reading as a box. */
.cover img {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  mix-blend-mode: multiply;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
}

/* ---------- What We Do ---------- */

.capability h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.5;
  color: var(--moss);
}

.capability > * + * {
  margin-top: 0.75rem;
}

.capabilities {
  display: grid;
  gap: 2.25rem;
  margin-top: 2.25rem;
}

/* Revenue Sharing — the one tinted panel on the page */
.panel {
  background: var(--pale-moss);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
}

.flow > .panel {
  margin-top: 3rem;
}

.panel .rule {
  margin-bottom: 1.25rem;
}

.panel .subheading {
  margin-bottom: 1rem;
}

/* ---------- Beyond Occupancy: four quiet blocks ---------- */

.themes {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  border-top: 1px solid var(--hairline);
}

.theme {
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--hairline);
}

.theme .subheading {
  margin-bottom: 0.5rem;
}

@media (min-width: 46rem) {
  .themes {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
}

/* ---------- Social Commitment ---------- */

.closing-line {
  margin-top: 2.5rem;
}

/* ---------- The OUAC Model at a Glance ---------- */

.model-table {
  width: 100%;
  margin-top: 2.5rem;
  border-collapse: collapse;
  text-align: left;
}

.model-table th,
.model-table td {
  padding: 1rem 0;
  vertical-align: top;
  font-weight: 400;
}

.model-table thead th {
  padding-top: 0;
  padding-bottom: 0.75rem;
  color: var(--moss);
  font-weight: 700;
  border-bottom: 1px solid var(--moss);
}

.model-table tbody tr {
  border-bottom: 1px solid var(--hairline);
}

.model-table tbody th[scope="row"] {
  width: 38%;
  padding-right: 2rem;
  color: var(--charcoal);
  font-weight: 700;
}

.model-table .group th {
  padding-top: 2.5rem;
  padding-bottom: 0.75rem;
  font-family: var(--font-serif);
  font-size: var(--fs-subheading);
  line-height: 1.35;
  color: var(--moss);
}

.model-table tbody:first-of-type .group:first-child th {
  padding-top: 1.75rem;
}

@media (max-width: 40rem) {
  .model-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .model-table,
  .model-table tbody,
  .model-table tr,
  .model-table th,
  .model-table td {
    display: block;
    width: 100%;
  }

  .model-table tbody tr {
    padding-block: 1rem;
  }

  .model-table tbody th[scope="row"] {
    width: 100%;
    padding: 0 0 0.25rem;
    color: var(--grey);
    font-weight: 400;
  }

  .model-table td {
    padding: 0;
  }

  .model-table .group th {
    padding: 2rem 0 0;
  }

  .model-table tbody tr.group {
    padding-block: 0 0.75rem;
  }
}

/* ---------- Our Partnership ---------- */

.bring {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

.bring .subheading {
  margin-bottom: 0.75rem;
}

@media (min-width: 46rem) {
  .bring {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.partnership-note {
  margin-top: 2.5rem;
}

.partnership-note > * + * {
  margin-top: 1.25em;
}

.gain {
  margin-top: 3.5rem;
}

.gain .subheading {
  margin-bottom: 1.25rem;
}

.gain .dots > li + li {
  margin-top: 1.25rem;
}

.gain strong {
  color: var(--moss);
}

/* Image slot for a future photograph */
.partnership-image {
  margin-top: 3.5rem;
}

.partnership-image img {
  width: 100%;
  border-radius: var(--radius);
}

/* ---------- Next page (secondary action) ---------- */

.next-page {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.next-page .label {
  display: block;
  color: var(--grey);
}

.next-page .text-link {
  padding-left: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-subheading);
  color: var(--moss);
}

/* ---------- Contact Us (Moss band) ---------- */

.contact h2 {
  color: var(--cream);
}

.contact-details {
  margin-top: 2rem;
}

.contact-details li + li {
  margin-top: 0.5rem;
}

.contact-details li::before {
  top: 50%;
  transform: translateY(-50%);
}

.contact-details a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-thickness 200ms ease;
  overflow-wrap: anywhere;
}

.contact-details a:hover,
.contact-details a:focus-visible {
  text-decoration-thickness: 3px;
}

/* Focus on Moss: Cream, 2px */
.band-moss :focus-visible {
  outline-color: var(--cream);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--moss);
  color: var(--cream);
}

.site-footer .frame {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--hairline-on-moss);
}

.footer-logo img {
  width: auto;
  height: 3rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
}

/* ---------- Motion: slow, soft fades ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--fade-duration) ease-out,
    transform var(--fade-duration) ease-out;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .skip-link {
    display: none;
  }

  .band-moss,
  .site-footer {
    background: none;
    color: var(--charcoal);
  }

  .contact h2,
  .contact-details a {
    color: var(--moss);
  }
}
