/* ============ SAMM AGENCY — SHARED DESIGN SYSTEM ============ */

:root{
  --bg: #F6F2EA;
  --surface: #FFFFFF;
  --surface-soft: #FBF7EF;
  --ink: #1E1B16;
  --ink-soft: #867C6D;
  --accent: #B9773F;
  --accent-2: #4B5A45;
  --line: #E9E1D2;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.4,0,.2,1);
  --shadow: 0 20px 40px -28px rgba(30,27,22,0.35);
  color-scheme: light;
}

html[data-theme="dark"]{
  --bg: #15130F;
  --surface: #1D1A15;
  --surface-soft: #221F19;
  --ink: #F4EFE6;
  --ink-soft: #A79E8E;
  --accent: #DA9563;
  --accent-2: #8AA07E;
  --line: #332E26;
  --shadow: 0 20px 40px -28px rgba(0,0,0,0.6);
  color-scheme: dark;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }
img{ max-width:100%; display:block; }

.wrap{ max-width: 1080px; margin: 0 auto; padding: 0 32px; }

.eyebrow{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}

h1, h2, h3{
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  line-height: 1.06;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeUp{ from{ opacity:0; transform: translateY(14px); } to{ opacity:1; transform: translateY(0); } }
@keyframes spin{ to{ transform: rotate(360deg); } }
@keyframes pop{ from{ transform: scale(0); } to{ transform: scale(1); } }

.reveal{ opacity:0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view{ opacity:1; transform: translateY(0); }

.load-in{ animation: fadeUp .7s var(--ease) both; }
.load-in.d1{ animation-delay: .06s; }
.load-in.d2{ animation-delay: .14s; }
.load-in.d3{ animation-delay: .22s; }
.load-in.d4{ animation-delay: .3s; }

/* ---------- NAV ---------- */
header{
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .35s var(--ease);
}
nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 32px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  gap: 16px;
}
.brand{ display:flex; align-items:baseline; gap:8px; font-family:'Instrument Serif', serif; font-size: 21px; flex-shrink:0; }
.brand span{ font-family:'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--ink-soft); letter-spacing: 0.08em; }

.home-link{
  display:flex; align-items:center; gap:6px;
  font-family:'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  padding: 8px 12px 8px 8px;
  border-radius: 100px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.home-link:hover{ background: var(--surface); color: var(--ink); }

.nav-links{ display:flex; gap: 30px; font-size: 14px; color: var(--ink-soft); }
.nav-links a{ position: relative; padding-bottom: 3px; }
.nav-links a.active{ color: var(--ink); }
.nav-links a::after{
  content:""; position:absolute; left:0; bottom:0; width:100%; height:1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease);
}
.nav-links a.active::after{ transform: scaleX(1); transform-origin: left; }
.nav-links a:hover{ color: var(--ink); }
.nav-links a:hover::after{ transform: scaleX(1); transform-origin: left; }

.nav-right{ display:flex; align-items:center; gap:10px; }

.theme-toggle{
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color: var(--ink); transition: transform .3s var(--ease), background .2s var(--ease);
  flex-shrink:0;
}
.theme-toggle:hover{ transform: rotate(20deg); }
.theme-toggle svg{ width:17px; height:17px; }
.theme-toggle .icon-moon{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-moon{ display:block; }

.nav-toggle{
  display:none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); border: none; cursor: pointer;
  flex-direction: column; align-items:center; justify-content:center; gap: 4px; flex-shrink:0;
}
.nav-toggle span{ width: 15px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.open span:nth-child(1){ transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity:0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu{ display:none; flex-direction:column; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 32px 20px; }
.mobile-menu.open{ display:flex; }
.mobile-menu a{ padding: 13px 0; border-top: 1px solid var(--line); font-size: 15px; }
.mobile-menu a:first-child{ border-top:none; }

@media (max-width: 860px){
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
}

/* ---------- BUTTONS ---------- */
.btn{
  position: relative; display:inline-flex; align-items:center; gap: 8px;
  padding: 13px 22px; border-radius: 100px; font-size: 14px; font-weight: 500;
  font-family: 'Inter', sans-serif; border: none; cursor: pointer; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.btn:active{ transform: scale(0.96); }

.btn-primary{ background: var(--ink); color: var(--bg); }
.btn-primary:hover{ background: var(--accent); color:#fff; transform: translateY(-2px); box-shadow: 0 12px 22px -10px rgba(185,119,63,0.5); }
.btn-primary:active{ transform: translateY(0) scale(0.96); }
.btn-primary .arrow{ display:inline-block; transition: transform .3s var(--ease); }
.btn-primary:hover .arrow{ transform: translateX(4px); }

.btn-ghost{ color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--ink); z-index: 0; }
.btn-ghost::before{ content:""; position:absolute; inset:0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); z-index: -1; }
.btn-ghost:hover{ color: var(--bg); }
.btn-ghost:hover::before{ transform: scaleX(1); }

.btn-sm{ padding: 9px 16px; font-size: 12.5px; }

/* ---------- HERO ---------- */
.hero{ padding: 88px 0 72px; display:grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items:end; }
.hero h1{ font-size: 54px; margin-top: 20px; max-width: 600px; }
.hero h1 em{ font-style: italic; color: var(--accent); }
.hero-sub{ font-size: 16px; color: var(--ink-soft); max-width: 420px; margin-top: 20px; }
.hero-actions{ display:flex; gap: 14px; margin-top: 30px; flex-wrap:wrap; }

.hero-card{ background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.hero-card .loc{ font-family:'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink-soft); display:flex; justify-content:space-between; margin-bottom: 16px; }
.hero-card ul{ list-style:none; }
.hero-card li{ display:flex; gap:10px; align-items:flex-start; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); }
.hero-card li:first-of-type{ border-top:none; }
.dot{ width:5px; height:5px; border-radius:50%; background: var(--accent-2); margin-top: 7px; flex-shrink:0; }

/* ---------- PAGE HERO (secondary pages) ---------- */
.page-hero{ padding: 64px 0 56px; }
.page-hero h1{ font-size: 46px; margin-top: 14px; max-width: 620px; }
.page-hero p{ font-size: 15.5px; color: var(--ink-soft); max-width: 460px; margin-top: 16px; }

section{ padding: 76px 0; }
section + section{ border-top: 1px solid var(--line); }

.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2{ font-size: 34px; }
.section-head p{ color: var(--ink-soft); max-width: 380px; font-size: 14.5px; }

/* ---------- OFFER LIST (services = product + price) ---------- */
.offer-grid{ display:grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.offer-row{
  display:flex; align-items:center; justify-content:space-between; gap: 14px; padding: 22px 28px;
  border-top: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left;
  transition: background .2s var(--ease); width:100%; color:inherit;
}
.offer-row:nth-child(odd){ border-right: 1px solid var(--line); }
.offer-row:nth-child(-n+2){ border-top: none; }
.offer-row:hover{ background: var(--surface-soft); }
.offer-left{ display:flex; align-items:center; gap: 14px; min-width:0; }
.offer-icon{ width: 38px; height: 38px; border-radius: 10px; background: var(--bg); display:flex; align-items:center; justify-content:center; color: var(--ink); flex-shrink:0; transition: background .2s var(--ease), color .2s var(--ease); }
.offer-row:hover .offer-icon{ background: var(--ink); color: var(--bg); }
.offer-icon svg{ width:18px; height:18px; }
.offer-name{ font-size: 15.5px; }
.offer-price{ font-family:'IBM Plex Mono', monospace; font-size: 13px; color: var(--ink-soft); white-space:nowrap; flex-shrink:0; }
@media (max-width: 720px){
  .offer-grid{ grid-template-columns: 1fr; }
  .offer-row:nth-child(odd){ border-right:none; }
  .offer-row:nth-child(-n+2){ border-top: 1px solid var(--line); }
  .offer-row:first-child{ border-top:none; }
}

/* ---------- CTA BANNER ---------- */
.cta-section{ padding: 0 0 76px; }
.cta-section:first-of-type{ padding-top: 0; border-top:none; }
.cta-banner{
  background: var(--ink); border-radius: var(--radius); padding: 52px 48px; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap: 14px; border-top: 2px solid var(--accent);
}
.cta-banner h2{ color: var(--bg); font-size: 34px; }
.cta-banner p{ color: #B9B2A4; font-size: 14.5px; max-width: 420px; }
html[data-theme="dark"] .cta-banner{ background: var(--surface-soft); }
html[data-theme="dark"] .cta-banner h2{ color: var(--ink); }
.cta-banner .btn-primary{ background: var(--accent); color: #fff; }
.cta-banner .btn-primary:hover{ background: var(--bg); color: var(--ink); box-shadow: none; }
@media (max-width: 640px){ .cta-banner{ padding: 38px 24px; } .cta-banner h2{ font-size: 28px; } }

/* ---------- PRICING ---------- */
.pricing-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 860px){ .pricing-grid{ grid-template-columns: 1fr; } }
.price-card{ background: var(--surface); padding: 34px 28px; display:flex; flex-direction:column; gap: 20px; }
.price-card.featured{ position: relative; }
.price-card.featured::before{ content:""; position:absolute; top:0; left:0; right:0; height:2px; background: var(--accent); }
.price-tag{ font-family:'IBM Plex Mono', monospace; font-size: 11px; letter-spacing:.06em; text-transform:uppercase; color: var(--accent); height: 14px; }
.price-head h3{ font-size: 24px; }
.price-head p{ font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.price-value{ display:flex; align-items:baseline; gap: 6px; }
.price-value .amount{ font-family:'Instrument Serif', serif; font-size: 42px; }
.price-value .period{ font-family:'IBM Plex Mono', monospace; font-size: 11px; color: var(--ink-soft); }
.price-list{ list-style:none; display:flex; flex-direction:column; gap: 12px; flex:1; }
.price-list li{ font-size: 13.5px; color: var(--ink-soft); padding-top: 12px; border-top: 1px solid var(--line); display:flex; gap:8px; }
.price-list li:first-child{ border-top:none; padding-top:0; }
.price-list li::before{ content:"–"; color: var(--ink); flex-shrink:0; }
.price-card .btn{ justify-content:center; margin-top: 4px; }

/* ---------- GUARANTEE ---------- */
.guarantee-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); }
@media (max-width: 860px){ .guarantee-grid{ grid-template-columns: 1fr; } }
.guarantee-card{ background: var(--surface); padding: 30px 28px; display:flex; flex-direction:column; gap: 10px; }
.guarantee-icon{ width:38px; height:38px; border-radius:10px; background: var(--bg); display:flex; align-items:center; justify-content:center; color: var(--accent-2); }
.guarantee-icon svg{ width:19px; height:19px; }
.guarantee-card h3{ font-size: 21px; margin-top: 4px; }
.guarantee-card p{ font-size: 13.5px; color: var(--ink-soft); }

/* ---------- EXTRAS ---------- */
.extras-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (max-width: 900px){ .extras-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .extras-grid{ grid-template-columns: 1fr; } }
.extra-card{ background: var(--surface); padding: 20px; transition: background .2s var(--ease); }
.extra-card:hover{ background: var(--surface-soft); }
.extra-top{ display:flex; justify-content:space-between; align-items:baseline; gap: 8px; }
.extra-card h4{ font-size: 14px; font-weight: 500; }
.extra-price{ font-family:'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--accent-2); white-space:nowrap; }
.extra-card p{ font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- WORK (compact preview) ---------- */
.project-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-grid.two-col{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .project-grid{ grid-template-columns: 1fr; } .hero{ grid-template-columns: 1fr; } .hero h1{ font-size: 38px; } }
@media (min-width: 641px) and (max-width: 900px){ .project-grid{ grid-template-columns: repeat(2,1fr); } }

.browser{ background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); box-shadow: var(--shadow); }
.browser:hover{ transform: translateY(-4px); }
.browser-chrome{ display:flex; align-items:center; gap: 9px; padding: 10px; border-bottom: 1px solid var(--line); }
.browser-dots{ display:flex; gap:4px; }
.browser-dots span{ width:6px; height:6px; border-radius:50%; background: var(--line); }
.browser-address{ flex:1; background: var(--bg); border-radius: 100px; padding: 3px 10px; font-family:'IBM Plex Mono', monospace; font-size: 10px; color: var(--ink-soft); text-align:center; }
.mock{ padding: 12px; }
.mock-nav{ display:flex; justify-content:space-between; align-items:center; margin-bottom: 10px; }
.mock-logo{ width:38px; height:6px; border-radius:3px; background: var(--ink); opacity:.7; }
.mock-links{ display:flex; gap:5px; }
.mock-links span{ width:15px; height:4px; border-radius:3px; background: var(--line); }
.mock-hero{ height: 54px; border-radius: 8px; margin-bottom: 10px; display:flex; flex-direction:column; justify-content:center; padding: 0 12px; gap:5px; }
.mock-hero .l1{ width:60%; height:7px; border-radius:3px; background: rgba(255,255,255,.85); }
.mock-hero .l2{ width:38%; height:5px; border-radius:3px; background: rgba(255,255,255,.55); }
.mock-row{ display:flex; gap:6px; }
.mock-row .card{ flex:1; height:32px; border-radius: 6px; background: var(--bg); }
.proj-1 .mock-hero{ background: linear-gradient(135deg, #B9773F, #8f5a2c); }
.proj-2 .mock-hero{ background: linear-gradient(135deg, #4B5A45, #333e2e); }
.proj-3 .mock-hero{ background: linear-gradient(135deg, #8A8072, #5c554b); }

.proj-info{ padding: 4px 14px 8px; }
.proj-info .kind{ font-family:'IBM Plex Mono', monospace; font-size: 10px; color: var(--accent-2); text-transform: uppercase; letter-spacing: .06em; }
.proj-info h3{ font-size: 20px; margin-top: 4px; }
.proj-info p{ font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }
.proj-tech{ display:flex; flex-wrap:wrap; gap:6px; padding: 0 14px 12px; }
.proj-tech span{ font-family:'IBM Plex Mono', monospace; font-size: 10px; padding: 3px 9px; border-radius: 100px; background: var(--bg); color: var(--ink-soft); }
.case-actions{ display:flex; gap: 8px; padding: 0 14px 16px; }
.case-actions .btn{ padding: 8px 12px; font-size: 12px; flex: 1; justify-content:center; }
.case-actions .btn-ghost{ box-shadow: inset 0 0 0 1px var(--line); }
.case-actions .btn-ghost:hover{ box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- PROCESS ---------- */
.process-list{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 900px){ .process-list{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .process-list{ grid-template-columns: 1fr; } }
.step .num{ font-family:'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); }
.step h3{ font-size: 20px; margin: 9px 0 7px; }
.step p{ font-size: 13.5px; color: var(--ink-soft); }

/* ---------- CREDENTIALS ---------- */
.creds-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 720px){ .creds-grid{ grid-template-columns: 1fr; } }
.cred-block h4{ font-family:'IBM Plex Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); margin-bottom: 18px; }
.cred-list{ list-style:none; }
.cred-list li{ padding: 13px 0; border-top: 1px solid var(--line); display:flex; justify-content:space-between; font-size: 14px; gap: 12px; }
.cred-list li:first-child{ border-top:none; }
.cred-list .meta{ color: var(--ink-soft); font-family:'IBM Plex Mono', monospace; font-size: 11.5px; white-space:nowrap; }
.tools-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool{ background: var(--surface); border-radius: 10px; padding: 14px 12px; font-size: 13px; text-align:center; transition: transform .2s var(--ease); box-shadow: var(--shadow); }
.tool:hover{ transform: translateY(-2px); }

/* ---------- CONTACT ---------- */
.contact-grid{ display:grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; }
@media (max-width: 860px){ .contact-grid{ grid-template-columns: 1fr; } }
.contact h2{ font-size: 38px; margin-bottom: 14px; }
.contact p.lead{ color: var(--ink-soft); font-size: 15px; max-width: 340px; margin-bottom: 24px; }
.contact-meta{ list-style:none; font-size: 14px; }
.contact-meta li{ padding: 11px 0; border-top: 1px solid var(--line); display:flex; gap:10px; }
.contact-meta li:first-child{ border-top:none; }
.contact-meta .label{ font-family:'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent-2); width: 90px; flex-shrink:0; text-transform:uppercase; letter-spacing:.05em; padding-top:2px; }

.social-row{ display:flex; gap: 10px; margin-top: 22px; }
.social-link{ width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display:flex; align-items:center; justify-content:center; transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease); }
.social-link svg{ width:16px; height:16px; }
.social-link:hover{ background: var(--ink); color: var(--bg); transform: translateY(-3px); }

.contact-panel{ background: var(--surface); border-radius: var(--radius); padding: 28px; display:flex; flex-direction:column; gap: 20px; box-shadow: var(--shadow); }

.product-select-label{ font-family:'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.product-select{ display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-chip{
  padding: 11px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line);
  font-size: 12.5px; text-align:center; cursor:pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
  user-select:none;
}
.product-chip:hover{ transform: translateY(-2px); }
.product-chip.active{ background: var(--ink); color: var(--bg); border-color: var(--ink); }

form{ display:flex; flex-direction:column; gap: 16px; }
.field{ display:flex; flex-direction:column; gap:7px; }
.field label{ font-family:'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.field input, .field textarea{
  font-family:'Inter', sans-serif; font-size: 14.5px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(185,119,63,0.15); }

#send-btn{ align-self:flex-start; min-width: 168px; justify-content:center; }
#send-btn .btn-label{ display:flex; align-items:center; gap:8px; transition: opacity .2s var(--ease); }
#send-btn .spinner{ display:none; width:15px; height:15px; border-radius:50%; border: 2px solid rgba(255,255,255,0.35); border-top-color: currentColor; animation: spin .7s linear infinite; }
#send-btn.is-loading .btn-label span.txt::before{ content:"Sending"; }
#send-btn.is-loading .arrow{ display:none; }
#send-btn.is-loading .spinner{ display:inline-block; }
#send-btn.is-loading{ pointer-events:none; opacity:.9; }
#send-btn.is-success{ background: var(--accent-2); }
#send-btn.is-success .btn-label span.txt::before{ content:"Sent"; }
#send-btn.is-success .arrow, #send-btn.is-success .spinner{ display:none; }
#send-btn .check{ display:none; }
#send-btn.is-success .check{ display:inline-block; animation: pop .35s var(--ease); }
#send-btn.is-error{ background: #A24A3B; color:#fff; }
#send-btn.is-error .btn-label span.txt::before{ content:"Try again"; }

.form-message{ font-size: 13.5px; padding: 12px 14px; border-radius: 10px; display: none; align-items:center; gap:8px; opacity: 0; transform: translateY(-4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.form-message.show{ display:flex; opacity:1; transform: translateY(0); }
.form-message.success{ background: #EDF0E7; color: #3d4a37; }
.form-message.error{ background: #F5E4DF; color: #A24A3B; }
html[data-theme="dark"] .form-message.success{ background: #24301F; color:#B9CDAE; }
html[data-theme="dark"] .form-message.error{ background: #3A2018; color:#E6B3A2; }

/* ---------- MODAL ---------- */
.modal-overlay{ position: fixed; inset:0; background: rgba(10,9,7,0.55); backdrop-filter: blur(3px); display:none; align-items:center; justify-content:center; padding: 24px; z-index: 100; opacity: 0; transition: opacity .25s var(--ease); }
.modal-overlay.open{ display:flex; opacity:1; }
.modal{ background: var(--surface); border-radius: var(--radius); max-width: 560px; width: 100%; max-height: 84vh; overflow-y: auto; padding: 34px; position: relative; transform: translateY(16px) scale(.98); transition: transform .25s var(--ease); }
.modal-overlay.open .modal{ transform: translateY(0) scale(1); }
.modal-close{ position:absolute; top: 18px; right: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg); border:none; cursor:pointer; font-size: 15px; color: var(--ink-soft); transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.modal-close:hover{ background: var(--ink); color: var(--bg); transform: rotate(90deg); }
.modal .kind{ font-family:'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent-2); text-transform:uppercase; letter-spacing:.06em; }
.modal h3{ font-size: 30px; margin: 8px 0 14px; }
.modal-tech{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom: 20px; }
.modal-tech span{ font-family:'IBM Plex Mono', monospace; font-size: 11px; padding: 5px 11px; border-radius:100px; background: var(--bg); color: var(--ink-soft); }
.modal-grid{ display:flex; flex-direction:column; gap: 16px; }
.modal-block h5{ font-family:'IBM Plex Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); margin-bottom: 6px; }
.modal-block p{ font-size: 14px; color: var(--ink-soft); }
.modal-actions{ display:flex; gap: 10px; margin-top: 24px; }
.modal-preview{ border-radius: var(--radius-sm); overflow:hidden; margin-bottom: 18px; border:1px solid var(--line); }

/* ---------- FLOATING BACK-TO-TOP ---------- */
.to-top{
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: var(--bg); border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); pointer-events:none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.to-top.show{ opacity:1; transform: translateY(0); pointer-events:auto; }
.to-top:hover{ background: var(--accent); }
.to-top svg{ width:16px; height:16px; }

footer{ border-top: 1px solid var(--line); padding: 26px 0; }
footer .wrap{ display:flex; justify-content:space-between; align-items:center; flex-wrap: wrap; gap: 10px; font-family:'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--ink-soft); }
footer .foot-links{ display:flex; gap:18px; }

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; scroll-behavior: auto !important; animation: none !important; }
  .reveal{ opacity:1; transform:none; }
  .load-in{ animation:none; }
}
