/* ==========================================================================
   Fernando the Tiler — styles
   Palette: navy + electric blue + slate/chrome on white. Cool, fancy, trusted.
   ========================================================================== */

:root {
  /* Brand / semantic colours */
  --navy-900: #0b1730;
  --navy-800: #0f1e3d;
  --navy-700: #13294b;
  --navy-600: #1c3a66;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-100: #dbeafe;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f6f8fc;
  --on-surface: #0f1e3d;
  --on-surface-soft: #475569;
  --danger: #dc2626;
  --success: #16a34a;

  --primary: var(--blue-600);
  --primary-hover: #1d4ed8;

  /* Type */
  --font-head: "Space Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Radius + elevation */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 61, .06), 0 1px 3px rgba(15, 30, 61, .08);
  --shadow-md: 0 6px 16px rgba(15, 30, 61, .08), 0 2px 6px rgba(15, 30, 61, .06);
  --shadow-lg: 0 20px 45px rgba(15, 30, 61, .16);
  --glow: 0 8px 24px rgba(37, 99, 235, .35);

  --container: 1140px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .4em; color: var(--navy-800); letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

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

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* ----------------------------------------------------------------- buttons */
.btn {
  --b: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 13px 20px; min-height: 46px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  cursor: pointer; text-align: center;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-lg { padding: 16px 26px; min-height: 54px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--glow); }

.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.16); border-color: #fff; }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--navy-800); margin-right: auto; }
.brand-badge {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px; overflow: hidden;
  background: var(--navy-800); box-shadow: var(--shadow-sm); flex: none;
}
.brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; }
.brand-tag { font-size: .75rem; color: var(--slate-500); font-weight: 500; }

.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--slate-700); font-weight: 600; font-size: .95rem;
  padding: 8px 14px; border-radius: var(--r-pill); transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover { background: var(--slate-100); color: var(--navy-800); }

.header-cta { display: flex; }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid var(--slate-200); border-radius: 12px;
  background: #fff; color: var(--navy-800); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }

.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 20px 20px; border-top: 1px solid var(--slate-200); background: #fff; }
.mobile-nav a { padding: 12px 8px; font-weight: 600; color: var(--slate-700); border-radius: var(--r-sm); }
.mobile-nav a:hover { background: var(--slate-100); }
.mobile-nav .btn { margin-top: 8px; }

/* ----------------------------------------------------------------- hero */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(11,23,48,.82), rgba(11,23,48,.92)),
    linear-gradient(120deg, var(--navy-700), var(--navy-900));
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("/images/gallery/01-designer-splashback.jpg");
  background-size: cover; background-position: center; opacity: .18; mix-blend-mode: luminosity;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; right: -120px; top: -120px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.45), transparent 65%);
  filter: blur(20px);
}
.hero-inner { padding: 84px 20px 92px; max-width: 820px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue-400); background: rgba(59,130,246,.12); border: 1px solid rgba(96,165,250,.3);
  padding: 7px 14px; border-radius: var(--r-pill); margin: 0 0 22px;
}
.eyebrow .icon { width: 1em; height: 1em; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.2vw, 3.5rem); margin-bottom: 18px; }
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: #d8e2f3; max-width: 60ch; margin-bottom: 30px; }
.hero-sub strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 26px; color: #cdd9ee; font-weight: 500; font-size: .95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--blue-400); width: 1.1em; height: 1.1em; }

/* ----------------------------------------------------------------- trust strip */
.trust { background: var(--navy-800); color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 22px 20px; }
.trust-item { display: flex; align-items: center; gap: 14px; justify-content: center; padding: 8px; }
.trust-item .icon { width: 30px; height: 30px; color: var(--blue-400); }
.trust-item div { display: flex; flex-direction: column; line-height: 1.2; }
.trust-item strong { font-size: 1.0625rem; }
.trust-item span { font-size: .8125rem; color: #9fb3d4; }

/* ----------------------------------------------------------------- sections */
.section { padding: 84px 0; }
.section-alt { background: var(--surface-alt); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.kicker { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin: 0 0 10px; }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.lede { color: var(--on-surface-soft); font-size: 1.0625rem; }

/* ----------------------------------------------------------------- services */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-card {
  background: var(--surface); border: 1px solid var(--slate-200); border-radius: var(--r-md);
  padding: 26px 22px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-100); }
.service-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(140deg, var(--blue-500), var(--navy-700)); color: #fff; margin-bottom: 16px;
}
.service-icon .icon { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.125rem; margin-bottom: 6px; }
.service-card p { margin: 0; color: var(--on-surface-soft); font-size: .95rem; }

/* ----------------------------------------------------------------- gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-md); overflow: hidden; background: var(--slate-100);
  box-shadow: var(--shadow-sm); aspect-ratio: 4 / 5;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(11,23,48,.62));
  opacity: .9; transition: opacity .2s var(--ease);
}
.gallery-tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .01em;
  background: rgba(15,30,61,.55); border: 1px solid rgba(255,255,255,.18);
  padding: 5px 11px; border-radius: var(--r-pill); backdrop-filter: blur(4px);
}
.work-note { text-align: center; color: var(--slate-500); font-size: .9rem; margin: 30px 0 0; }

/* ----------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; }
.about-photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.about-photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(15,30,61,.08); border-radius: var(--r-lg); }
.about-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.about-text h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.about-text p { color: var(--on-surface-soft); }
.about-list { margin: 22px 0 28px; display: grid; gap: 12px; }
.about-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--navy-800); }
.about-list .icon { color: var(--primary); width: 22px; height: 22px; }

/* ----------------------------------------------------------------- process */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.process-step { position: relative; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-md); padding: 28px 22px; box-shadow: var(--shadow-sm); }
.step-num {
  position: absolute; top: -16px; left: 22px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy-800); color: #fff; font-family: var(--font-head); font-weight: 700; box-shadow: var(--shadow-md);
}
.step-icon { width: 30px; height: 30px; color: var(--primary); margin: 10px 0 14px; }
.process-step h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.process-step p { margin: 0; color: var(--on-surface-soft); font-size: .92rem; }

/* ----------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 52px; align-items: start; }
.contact-intro h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.contact-methods { display: grid; gap: 12px; margin: 26px 0; }
.contact-chip {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-md);
  padding: 14px 18px; box-shadow: var(--shadow-sm); color: var(--navy-800);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease);
}
.contact-chip:hover { border-color: var(--blue-400); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.contact-chip .icon { width: 26px; height: 26px; color: var(--primary); }
.contact-chip span { display: flex; flex-direction: column; line-height: 1.25; }
.contact-chip small { font-size: .75rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.contact-chip strong { font-size: 1.05rem; }
.service-area { display: flex; align-items: flex-start; gap: 8px; color: var(--slate-600); font-size: .92rem; }
.service-area .icon { color: var(--primary); width: 20px; height: 20px; margin-top: 2px; }

.contact-form {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-md);
}
.form-row { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; color: var(--navy-800); margin-bottom: 7px; }
.req { color: var(--danger); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; color: var(--on-surface);
  padding: 12px 14px; min-height: 46px; background: var(--surface-alt);
  border: 1px solid var(--slate-200); border-radius: var(--r-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.contact-form input[aria-invalid="true"], .contact-form textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .82rem; margin: 6px 0 0; min-height: 0; font-weight: 500; }
.field-error:empty { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cf-turnstile { margin: 4px 0 20px; min-height: 65px; }

.btn-submit { width: 100%; position: relative; }
.btn-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  display: none; animation: spin .7s linear infinite;
}
.btn-submit.is-loading .btn-spinner { display: inline-block; }
.btn-submit.is-loading .btn-label { opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { margin: 16px 0 0; font-weight: 600; font-size: .95rem; border-radius: var(--r-sm); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); background: #ecfdf5; border: 1px solid #bbf7d0; padding: 12px 14px; }
.form-fineprint { margin: 14px 0 0; font-size: .8rem; color: var(--slate-500); }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--navy-900); color: #c8d4e8; padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .brand-badge { width: 52px; height: 52px; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-head); font-size: 1.1rem; }
.footer-brand span { font-size: .9rem; color: #93a6c6; }
.footer-meta p { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .9rem; }
.footer-meta .icon { width: 18px; height: 18px; color: var(--blue-400); }
.footer-legal { color: #7185a6; font-size: .82rem; }

/* ----------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 14, 30, .92); padding: 5vh 16px;
  opacity: 0; animation: lbIn .2s var(--ease) forwards;
}
.lightbox[hidden] { display: none; }
@keyframes lbIn { to { opacity: 1; } }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-figure img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lb-figure figcaption { color: #dbe4f3; font-size: .95rem; text-align: center; }
.lb-btn {
  position: absolute; display: grid; place-items: center; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff;
  transition: background .2s var(--ease);
}
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-btn .icon { width: 26px; height: 26px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ----------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}
@media (max-width: 860px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.nav-open .mobile-nav { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 420px; margin: 0 auto; }
  .section { padding: 64px 0; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 8px; }
}
@media (max-width: 620px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .service-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-inner { padding: 60px 20px 68px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .contact-form { padding: 22px; }
}

/* ----------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .gallery-item:hover img, .gallery-item:focus-visible img { transform: none; }
}
