/* =========================================================================
   Simmetry.Creates — App shell, layout, page styles
   ========================================================================= */

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: clip;
}

/* Mode transition: kept on tokens; we suppress per-element transition
   during the circular reveal so the reveal itself owns the motion. */
[data-mode], [data-mode] * {
  transition:
    background-color 400ms var(--ease),
    color 400ms var(--ease),
    border-color 400ms var(--ease),
    fill 400ms var(--ease);
}
.is-revealing,
.is-revealing * {
  transition: none !important;
}

a { color: inherit; }

img { display: block; max-width: 100%; }

/* ---------- Layout container --------------------------------------------- */
.smy-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 720px) {
  .smy-container { padding: 0 24px; }
}

/* ---------- Top nav (fixed, hides on scroll-down) ------------------------ */
.smy-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  transform: translateY(0);
  transition: transform 380ms var(--ease), background-color 400ms var(--ease), border-color 400ms var(--ease);
}
.smy-topnav.is-hidden { transform: translateY(-100%); }

.smy-topnav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 48px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .smy-topnav__inner { padding: 0 24px; height: 64px; }
}

.smy-brand {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 24px;
  letter-spacing: 0.005em;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.smy-brand .dot { color: var(--accent); }

.smy-brand--with-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.smy-brand__emblem {
  position: relative;
  display: inline-block;
  width: 44px; height: 44px;
  flex: 0 0 44px;
}
.smy-brand__emblem-layer {
  position: absolute; inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 700ms var(--ease);
}
.smy-brand__emblem-layer.is-active { opacity: 1; }
.smy-brand__word { display: inline-block; }
@media (max-width: 480px) {
  .smy-brand__emblem { width: 36px; height: 36px; flex-basis: 36px; }
  .smy-brand { font-size: 20px; }
}

.smy-topnav__right {
  display: flex;
  align-items: center;
  gap: 28px;
}
@media (max-width: 900px) {
  .smy-topnav__right { gap: 18px; }
  .smy-topnav__links { gap: 22px; }
}
/* On mobile we collapse the inline nav into a hamburger panel */
.smy-menubtn { display: none; }
@media (max-width: 720px) {
  .smy-topnav__inline { display: none !important; }
  .smy-menubtn { display: inline-flex; }
  .smy-brand { font-size: 22px; }
}
@media (max-width: 380px) {
  .smy-brand__word { display: none; }
}

.smy-topnav__links {
  display: flex;
  gap: 32px;
}
.smy-navlink {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 200ms var(--ease);
  padding: 6px 0;
}
.smy-navlink:hover, .smy-navlink[aria-current="page"] { opacity: 1; }

.smy-topnav__divider { width: 1px; height: 14px; background: var(--hairline); }

/* Mode toggle: editorial filter style */
.smy-modetoggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.smy-modetoggle__btn {
  background: none; border: 0; padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.5;
  transition: opacity 220ms var(--ease);
}
.smy-modetoggle__btn:hover { opacity: 0.85; }
.smy-modetoggle__btn[aria-pressed="true"] { opacity: 1; cursor: default; }
.smy-modetoggle__sep {
  display: inline-block;
  width: 1px; height: 11px;
  background: var(--hairline);
}

/* Larger variant used inside the mobile panel */
.smy-modetoggle--lg { gap: 18px; }
.smy-modetoggle--lg .smy-modetoggle__btn { font-size: 16px; letter-spacing: 0.08em; padding: 8px 0; }
.smy-modetoggle--lg .smy-modetoggle__sep { height: 18px; }

/* ---------- Hamburger button + mobile panel ------------------------------ */
.smy-menubtn {
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--fg);
}
.smy-menubtn__icon {
  position: relative;
  display: block;
  width: 22px; height: 14px;
}
.smy-menubtn__icon span {
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--fg);
  border-radius: 1px;
  transition: transform 260ms var(--ease), opacity 220ms var(--ease), top 260ms var(--ease);
}
.smy-menubtn__icon span:nth-child(1) { top: 0; }
.smy-menubtn__icon span:nth-child(2) { top: 6.25px; }
.smy-menubtn__icon span:nth-child(3) { top: 12.5px; }
.smy-menubtn.is-open .smy-menubtn__icon span:nth-child(1) { top: 6.25px; transform: rotate(45deg); }
.smy-menubtn.is-open .smy-menubtn__icon span:nth-child(2) { opacity: 0; }
.smy-menubtn.is-open .smy-menubtn__icon span:nth-child(3) { top: 6.25px; transform: rotate(-45deg); }

.smy-panel {
  position: fixed;
  left: 0; right: 0;
  top: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 320ms var(--ease), visibility 0s linear 320ms;
  z-index: 49;
}
.smy-panel.is-open {
  max-height: calc(100vh - 64px);
  visibility: visible;
  transition: max-height 360ms var(--ease), visibility 0s linear 0s;
}
.smy-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 28px 24px 36px;
  max-width: 720px;
  margin: 0 auto;
}
.smy-panel__group { display: flex; flex-direction: column; gap: 14px; }
.smy-panel__nav { gap: 4px; }
.smy-panel__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.smy-panel__link {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--fg);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.smy-panel__link:last-child { border-bottom: 0; }
.smy-panel__link[aria-current="page"] { color: var(--accent); }

/* Defensively hide the panel on desktop in case the menu state lingers. */
@media (min-width: 721px) {
  .smy-panel,
  .smy-panel.is-open { display: none; }
}

/* ---------- Mode reveal mask --------------------------------------------- */
/* The reveal works by painting the *new* theme onto an overlay and clipping
   that overlay with an expanding circle. After the animation we commit the
   theme to <html data-mode> and hide the overlay. */
.smy-reveal {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
  background: var(--bg);
  clip-path: circle(0px at 50% 50%);
}
.smy-reveal.is-active {
  visibility: visible;
  clip-path: circle(var(--reveal-radius, 0px) at var(--reveal-x, 50%) var(--reveal-y, 50%));
  transition: clip-path 880ms cubic-bezier(0.65, 0, 0.25, 1);
}
.smy-reveal__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.smy-reveal__emblem {
  width: 220px; height: 220px;
  opacity: 0.95;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Page scaffolding --------------------------------------------- */
.smy-page {
  padding-top: 72px; /* offset for fixed nav */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (max-width: 720px) { .smy-page { padding-top: 64px; } }

/* ---------- Caption type ------------------------------------------------- */
.caption {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--fg-muted);
}
.caption--accent { color: var(--accent); }

/* ---------- Footer ------------------------------------------------------- */
.smy-footer {
  margin-top: 128px;
  border-top: 1px solid var(--hairline);
  padding: 64px 0 48px;
}
@media (max-width: 720px) { .smy-footer { margin-top: 64px; padding: 48px 0 32px; } }
.smy-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .smy-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.smy-footer__brand {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.2;
}
.smy-footer__brand .dot { color: var(--accent); }
.smy-footer__tagline {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.6;
}
.smy-footer__col h6 {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.smy-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.smy-footer__col a {
  text-decoration: none;
  color: var(--fg);
  opacity: 0.75;
  font-size: 14px;
  transition: opacity 200ms var(--ease);
}
.smy-footer__col a:hover { opacity: 1; }
.smy-footer__base {
  margin-top: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  font-feature-settings: "tnum" 1;
}
@media (max-width: 720px) {
  .smy-footer__base { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Tile (placeholder photography) -------------------------------- */
/* Solid tonal block with subtle inner hairline frame. No gradient. */
.smy-tile {
  position: relative;
  width: 100%;
  background: var(--photo-ground);
  overflow: hidden;
}
.smy-tile--portrait { aspect-ratio: 4 / 5; }
.smy-tile--square   { aspect-ratio: 1 / 1; }
.smy-tile--wide     { aspect-ratio: 3 / 2; }
.smy-tile--tall     { aspect-ratio: 3 / 4.4; }
.smy-tile--hero     { aspect-ratio: 16 / 9; }
.smy-tile--vhero    { aspect-ratio: 3 / 4; }

.smy-tile__mark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  opacity: 0.55;
}
/* Subtle tonal variation per tile, derived in JS via a CSS var */
.smy-tile[style*="--tone"] { background: var(--tile-bg, var(--photo-ground)); }

/* Photo-backed tile */
.smy-tile--photo { background: var(--photo-ground); }
.smy-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.smy-tile__img--cover    { object-fit: cover; object-position: center; }
.smy-tile__img--contain  { object-fit: contain; object-position: center; padding: 6%; }

/* Hairline corner brackets — crafted detail, not a logo */
.smy-tile__corners::before,
.smy-tile__corners::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--hairline);
  opacity: 0.55;
}
.smy-tile__corners::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.smy-tile__corners::after  { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

/* ---------- Buttons / CTAs ----------------------------------------------- */
.smy-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  cursor: pointer;
  transition: border-color 220ms var(--ease), padding 240ms var(--ease);
  align-self: flex-start;
}
.smy-cta:hover { border-bottom-color: var(--fg); padding-right: 6px; }
.smy-cta__arrow { transition: transform 240ms var(--ease); }
.smy-cta:hover .smy-cta__arrow { transform: translateX(4px); }

.smy-cta--solid {
  border: 1px solid var(--fg);
  padding: 14px 22px;
  border-radius: var(--radius-1);
}
.smy-cta--solid:hover {
  background: var(--fg);
  color: var(--bg);
  padding-right: 22px;
}
.smy-cta--solid:hover .smy-cta__arrow { transform: translateX(4px); }

/* ---------- Inputs ------------------------------------------------------- */
.smy-field { display: flex; flex-direction: column; gap: 8px; }
.smy-field__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.smy-input,
.smy-textarea,
.smy-select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  padding: 10px 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  outline: none;
  transition: border-color 220ms var(--ease);
  appearance: none;
}
.smy-input:focus, .smy-textarea:focus, .smy-select:focus {
  border-bottom-color: var(--fg);
}
.smy-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.smy-select { background-image: none; padding-right: 24px; }

/* Radio chip (project type) */
.smy-radios { display: flex; gap: 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); flex-wrap: wrap; }
.smy-radios label {
  flex: 1 1 33%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: pointer;
  border-right: 1px solid var(--hairline);
  transition: color 200ms var(--ease), background 200ms var(--ease);
  text-align: center;
}
@media (max-width: 480px) {
  .smy-radios label { font-size: 11px; padding: 12px 8px; letter-spacing: 0.06em; }
}
.smy-radios label:last-child { border-right: 0; }
.smy-radios input { display: none; }
.smy-radios label:has(input:checked) { color: var(--fg); }
.smy-radios label:has(input:checked)::before {
  content: "—"; color: var(--accent); margin-right: 4px;
}

/* ---------- Hero / pages decorative bits --------------------------------- */
.smy-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.smy-eyebrow .num {
  color: var(--accent);
  margin-right: 10px;
  font-feature-settings: "tnum" 1;
}

.smy-display {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--fg);
  margin: 0;
  text-wrap: balance;
}
.smy-display em {
  font-style: italic;
  font-weight: 300;
}

.smy-lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 50ch;
}

/* ---------- Section header ---------------------------------------------- */
.smy-secthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 64px;
}
.smy-secthead__num {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-feature-settings: "tnum" 1;
}
.smy-secthead h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.008em;
  margin: 8px 0 0;
  text-wrap: balance;
}

/* ---------- Emblem (decorative, soft cross-fade) ------------------------- */
.smy-emblem {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.smy-emblem__layer {
  position: absolute; inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 700ms var(--ease);
}
.smy-emblem__layer.is-active { opacity: 1; }

/* ---------- Tweaks: keep them minimal ------------------------------------ */
.tw-pill { /* Variant chooser cluster */
  display: flex; gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-1);
  overflow: hidden;
}
.tw-pill button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--hairline);
  padding: 8px 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}
.tw-pill button:last-child { border-right: 0; }
.tw-pill button.is-on { color: var(--fg); background: var(--surface); }

/* ---------- Reveal-on-scroll --------------------------------------------- */
.smy-reveal-up {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.smy-reveal-up.is-in { opacity: 1; transform: none; }

/* ---------- Misc helpers ------------------------------------------------- */
.smy-rule {
  height: 1px; width: 100%;
  background: var(--hairline);
  border: 0;
  margin: 0;
}
.smy-rule--accent { background: var(--accent); width: 48px; height: 1px; }

.smy-wordmark-inline {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.005em;
}
.smy-wordmark-inline .dot { color: var(--accent); }
