/* ==========================================================================
   Hyolmo Creative Link — Global Stylesheet
   Design system: "Registration Marks" — grounded in the offset-press side
   of the business. Corner registration marks + halftone screen tint stand
   in for decoration; nothing is added that isn't earned by the brief.
   ========================================================================== */

/* -------------------- Tokens -------------------- */
:root {
  /* Color */
  --ink: #1b2430;
  --ink-soft: #2c3846;
  --paper: #f1ede3;
  --paper-dim: #e8e2d3;
  --seal: #8b2635;
  --seal-dark: #6c1d29;
  --brass: #c77d2e;
  --teal: #3c5a5b;
  --muted: #6b675c;
  --line: rgba(27, 36, 48, 0.14);
  --line-on-dark: rgba(241, 237, 227, 0.22);

  /* Type */
  --font-display: "Zilla Slab", "Georgia", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Scale */
  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.18rem + 0.35vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.45rem + 0.75vw, 2.1rem);
  --step-3: clamp(2.1rem, 1.8rem + 1.5vw, 3.2rem);
  --step-4: clamp(2.6rem, 2.1rem + 2.5vw, 4.6rem);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body, h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }

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

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

/* -------------------- Halftone / texture utility --------------------
   A faint dot screen — the literal texture of offset-printed color —
   used sparingly as a section background, never as blanket decoration. */
.halftone {
  background-image: radial-gradient(var(--ink) 0.6px, transparent 0.6px);
  background-size: 9px 9px;
  background-position: 0 0;
  opacity: 0.05;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* -------------------- Registration marks --------------------
   Corner crop/registration marks: the alignment marks printers use to
   line up color plates. Used at the corners of the hero and key section
   frames as the page's signature device. */
.reg-mark {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0.55;
}
.reg-mark::before,
.reg-mark::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.reg-mark::before { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.reg-mark::after { left: 50%; top: 0; height: 100%; width: 1px; transform: translateX(-50%); }
.reg-mark-circle {
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 9px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.reg-mark--light::before, .reg-mark--light::after { background: var(--paper); }
.reg-mark--light .reg-mark-circle { border-color: var(--paper); }

.reg-tl { top: 14px; left: 14px; }
.reg-tr { top: 14px; right: 14px; }
.reg-bl { bottom: 14px; left: 14px; }
.reg-br { bottom: 14px; right: 14px; }

/* -------------------- Eyebrow label -------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9em 1.5em;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  transition: background-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.btn--primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--primary:hover { background: var(--seal); border-color: var(--seal); }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* -------------------- Header / Nav -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241, 237, 227, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 200ms ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(27, 36, 48, 0.08); }

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.logo {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}
.logo span { color: var(--seal); }
.logo small {
  font-family: var(--font-mono);
  font-size: 0.5em;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 400;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 200ms ease, opacity 200ms ease; }
.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); }

.nav-menu {
  position: fixed;
  inset: 0 0 0 30%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem var(--gutter);
  transform: translateX(100%);
  transition: transform 280ms ease;
  overflow-y: auto;
}
.nav-menu.is-open { transform: translateX(0); }

.nav-menu > ul { display: flex; flex-direction: column; gap: 1.1rem; }
.nav-link {
  font-family: var(--font-display);
  font-size: var(--step-2);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--brass); }

.nav-sub { margin-top: 0.5rem; padding-left: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-sub a { font-family: var(--font-body); font-size: var(--step--1); color: var(--line-on-dark); }
.nav-sub a:hover { color: var(--paper); }

.nav-item.has-sub > .nav-link { display: flex; align-items: center; gap: 0.5rem; }
.nav-item.has-sub > .nav-link::after { content: "+"; font-family: var(--font-mono); font-size: 0.6em; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    inset: auto;
    background: none;
    color: var(--ink);
    flex-direction: row;
    padding: 0;
    transform: none;
    overflow: visible;
  }
  .nav-menu > ul { flex-direction: row; gap: clamp(1rem, 2vw, 2.2rem); align-items: center; }
  .nav-link { font-family: var(--font-body); font-size: var(--step--1); letter-spacing: 0.02em; position: relative; }
  .nav-link:hover, .nav-link:focus-visible { color: var(--seal); }
  .nav-item.has-sub > .nav-link::after { content: ""; width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-top: -3px; }

  .nav-item.has-sub { position: relative; }
  .nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.75rem;
    padding: 1rem 0;
    background: var(--ink);
    color: var(--paper);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
  }
  .nav-item.has-sub:hover .nav-sub,
  .nav-item.has-sub:focus-within .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-sub a { padding: 0.4rem 1.25rem; display: block; }
  .nav-sub a:hover { background: rgba(241,237,227,0.08); }
  .nav-cta { margin-left: 0.5rem; }
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .container {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 {
  margin-block: 1rem 1.25rem;
  font-size: var(--step-4);
  max-width: 14ch;
}
.hero h1 em { font-style: normal; color: var(--seal); }
.hero-sub { max-width: 46ch; color: var(--muted); font-size: var(--step-0); margin-bottom: 1.75rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-mosaic {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 60px;
  gap: 0.6rem;
}
.mosaic-item {
  position: relative;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.mosaic-caption {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0.6rem;
  background: linear-gradient(to top, rgba(241,237,227,0.9), transparent);
  width: 100%;
}
.mosaic-item--a { grid-column: span 4; grid-row: span 5; }
.mosaic-item--b { grid-column: span 2; grid-row: span 3; }
.mosaic-item--c { grid-column: span 2; grid-row: span 2; }
.mosaic-item--d { grid-column: span 6; grid-row: span 3; }

@media (min-width: 760px) {
  .hero .container { grid-template-columns: 1.05fr 1fr; align-items: center; }
}

/* -------------------- Section shell -------------------- */
.section {
  padding-block: clamp(3rem, 7vw, 6rem);
  position: relative;
}
.section-head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head h2 { font-size: var(--step-3); margin-top: 0.6rem; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .eyebrow { color: var(--brass); }
.section--dark .muted { color: rgba(241,237,227,0.65); }
.muted { color: var(--muted); }

/* -------------------- Services grid -------------------- */
.services-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--paper);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background-color 200ms ease;
}
.service-card:hover { background: var(--paper-dim); }
.service-mark {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--seal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--seal);
  flex-shrink: 0;
}
.service-card h3 { font-size: var(--step-1); }
.service-card p { color: var(--muted); font-size: var(--step--1); }
.service-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.service-card:hover .service-link { color: var(--seal); }

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* -------------------- News strip -------------------- */
.news-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.news-card { display: flex; flex-direction: column; gap: 0.75rem; }
.news-thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  position: relative;
}
.news-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--seal); letter-spacing: 0.04em; }
.news-card h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; }
.news-card p { color: var(--muted); font-size: var(--step--1); }

@media (min-width: 760px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* -------------------- Gallery preview -------------------- */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-dim);
  border: 1px solid var(--line);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease, filter 400ms ease; }
.gallery-item:hover img { transform: scale(1.04); }
/* Subtle off-register hover: nods to a mis-registered print plate */
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 2px 0 0 rgba(139,38,53,0), inset -2px 0 0 rgba(60,90,91,0);
  transition: box-shadow 300ms ease;
}
.gallery-item:hover::after {
  box-shadow: inset 2px 0 0 rgba(139,38,53,0.35), inset -2px 0 0 rgba(60,90,91,0.35);
}

@media (min-width: 640px) {
  .gallery-preview { grid-template-columns: repeat(4, 1fr); }
}

/* -------------------- Testimonials -------------------- */
.testimonial-grid {
  display: grid;
  gap: 1.5rem;
}
.testimonial {
  border: 1px solid var(--line-on-dark);
  padding: clamp(1.5rem, 3vw, 2rem);
  position: relative;
}
.testimonial p { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.4; }
.testimonial footer { margin-top: 1.25rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.03em; color: var(--brass); }

@media (min-width: 760px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}

/* -------------------- CTA band -------------------- */
.cta-band {
  position: relative;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
  border-block: 1px solid var(--line);
}
.cta-band h2 { font-size: var(--step-3); max-width: 20ch; margin-inline: auto 1.5rem; }
.cta-band .btn { margin-top: 0.5rem; }

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-on-dark);
}
.footer-brand .logo { color: var(--paper); }
.footer-brand p { margin-top: 1rem; color: rgba(241,237,227,0.65); max-width: 34ch; font-size: var(--step--1); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.9rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: rgba(241,237,227,0.75); font-size: var(--step--1); }
.footer-col a:hover { color: var(--paper); }

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(241,237,227,0.55);
}

@media (min-width: 640px) {
  .footer-cols { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .footer-top { grid-template-columns: 1.2fr 2fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* -------------------- Reveal-on-scroll -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* -------------------- Utility -------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
