/* Oury Clark — Design tokens */
:root {
  --bg: #F7F3EB;
  --paper: #FBF8F1;
  --ink: #0A0A0A;
  --ink-2: #231F20;
  --gray-1: #434F4E;
  --gray-2: #7C8786;
  --gray-3: #AFB9B8;
  --gray-4: #D6DEDE;
  --gray-5: #EBF1F1;
  --sage: #ABBA9B;
  --sage-dk: #8FA080;
  --gold: #CCB364;
  --gold-dk: #B7982E;
  --forest: #004642;
  --red: #DD4A4A;
  --plum: #5E4C5E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font-family: 'P22 Underground', 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }

/* type */
.ivy { font-family: 'ivyora-display', 'Cormorant Garamond', 'Times New Roman', serif; font-weight: 400; }
.lyyra { font-family: 'Lyyra', 'Inter', sans-serif; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; }
.p22 { font-family: 'P22 Underground', 'Inter', sans-serif; font-weight: 400; }

.h1 { font-family: 'ivyora-display', serif; font-size: 80px; line-height: 1.02; letter-spacing: -0.01em; }
.h2 { font-family: 'ivyora-display', serif; font-size: 45px; line-height: 50px; }
.h3 { font-family: 'ivyora-display', serif; font-size: 35px; line-height: 40px; }
.h4 { font-family: 'ivyora-display', serif; font-size: 25px; line-height: 30px; }
.eyebrow { font-family: 'Lyyra', 'Inter', sans-serif; font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 400; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 60px; padding: 0 32px; font-family: 'Lyyra', 'Inter', sans-serif; font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer; border: 1px solid transparent; transition: all .25s ease; text-decoration: none; white-space: nowrap; }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dk); border-color: var(--gold-dk); color: #fff; }
.btn-black { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-black:hover { background: #fff; color: var(--ink); }
.btn-white { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-white:hover { background: var(--ink); color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-white:hover { background: #fff; color: var(--ink); }
.btn-sm { height: 44px; padding: 0 22px; font-size: 12px; }

/* link */
.linklink { font-family: 'Lyyra', 'Inter', sans-serif; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 6px; color: var(--ink); cursor: pointer; }
.linklink:hover { color: var(--gold-dk); }

/* layout */
.shell { max-width: 1440px; margin: 0 auto; position: relative; }
.wrap { padding: 0 clamp(24px, 6vw, 100px); }
@media (max-width: 980px){ .wrap { padding: 0 24px; } }
/* Override hard-coded inline paddings via important override class */
.wrap-responsive { padding-left: clamp(24px, 6vw, 100px) !important; padding-right: clamp(24px, 6vw, 100px) !important; }

/* textures */
.paper-bg { background: var(--paper); background-image: radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px); background-size: 3px 3px; }
.noise {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* decorative divider */
.divider-lines { display:flex; align-items:center; gap: 8px; width: 100%; padding: 32px 0; }
.divider-lines::before, .divider-lines::after { content: ""; flex: 1; height: 3px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.divider-lines > span { width: 2px; height: 24px; background: currentColor; box-shadow: -6px 0 0 currentColor; }

/* ticker */
.ticker { overflow: hidden; background: var(--bg); border-block: 1px solid var(--ink); padding: 12px 0; }
.ticker-track { display: inline-flex; gap: 64px; white-space: nowrap; animation: tick 42s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker-item { display:inline-flex; align-items:center; gap: 24px; font-family:'Lyyra','Inter',sans-serif; font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase; }
.ticker-item .diamond { width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); display: inline-block; }

/* route card (hero) */
.route-card { width: 100%; max-width: 300px; text-align: center; color: var(--ink); cursor: pointer; margin: 0 auto; }
.route-card .compass { position: relative !important; width: 200px; height: 200px; margin: 0 auto 28px; display:grid; place-items:center; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.route-card:hover .compass { transform: rotate(6deg) scale(1.04); }
.route-card:hover .compass .needle { transform: rotate(-45deg); }
.compass .ring { position:absolute; inset:0; border-radius: 50%; border: 1px solid var(--ink); }
.compass .ring.inner { inset: 16px; }
.compass .ring.dotted { inset: 6px; border: 1px dashed var(--ink); }
.compass .needle { width: 2px; height: 140px; background: var(--ink); position:absolute; transform-origin: center; transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.compass .needle::before, .compass .needle::after { content: ""; position:absolute; left:50%; transform: translateX(-50%); width: 0; height: 0; }
.compass .needle::before { top: -1px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 14px solid var(--red); }
.compass .needle::after { bottom: -1px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 14px solid var(--ink); }
.compass .card-n, .compass .card-s, .compass .card-e, .compass .card-w { position:absolute; font-family:'Lyyra','Inter',sans-serif; font-size:10px; letter-spacing:0.2em; }
.compass .card-n { top: -16px; left: 50%; transform: translateX(-50%); }
.compass .card-s { bottom: -16px; left: 50%; transform: translateX(-50%); }
.compass .card-w { left: -16px; top: 50%; transform: translateY(-50%); }
.compass .card-e { right: -16px; top: 50%; transform: translateY(-50%); }

/* small compasses */
.mini-compass { width: 110px; height: 140px; position: relative; margin: 0 auto; }
.mini-compass svg { width: 100%; height: 100%; }

/* hero frame octopus badge */
.badge {
  width: 320px; height: 320px; border-radius: 50%; background: var(--paper);
  display:grid; place-items:center; position:relative;
  box-shadow: inset 0 0 0 1px var(--forest), inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--forest);
  font-family: 'ivyora-display', serif; color: var(--forest);
}

/* cards with cutout */
.tag-card { position:relative; border-radius: 20px; overflow:hidden; padding: 60px 48px; color:#fff; }
.tag-card::before {
  content: ""; position:absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 48px; height: 24px; background: var(--bg); border-radius: 0 0 48px 48px;
}
.tag-card .inner { position:relative; z-index: 1; border: 1px solid var(--gold); border-radius: 14px; padding: 60px 40px; display:flex; flex-direction:column; gap: 40px; align-items:center; min-height: 600px; }

/* focus rings off */
button:focus, a:focus { outline: none; }

/* accordion dropdown nav */
.nav-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-top: 1px solid var(--ink); overflow:hidden; max-height: 0; transition: max-height .4s ease; z-index: 40; }
.nav-dropdown.open { max-height: 560px; }

/* number animate */
.big-number { font-family: 'ivyora-display', serif; font-size: 140px; line-height: 1; }
.big-number sup { font-size: 60px; vertical-align: top; }

/* testimonial */
.bigquote { font-family: 'Lyyra', 'Inter', sans-serif; font-size: 22px; line-height: 1.45; letter-spacing: 0.12em; text-transform: uppercase; }

/* tweaks */
#tweaks-panel {
  position: fixed; right: 24px; bottom: 24px; width: 320px; background: #fff; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 14px; padding: 20px; z-index: 100;
  box-shadow: 0 20px 50px rgba(0,0,0,.18); font-family: 'Inter', sans-serif;
  display: none;
}
#tweaks-panel.visible { display: block; }
#tweaks-panel h4 { font-family:'ivyora-display', serif; font-size: 22px; margin-bottom: 12px; font-weight: 400; }
#tweaks-panel label { display:block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; margin-top: 14px; margin-bottom: 6px; color: var(--gray-1); }
#tweaks-panel select, #tweaks-panel input[type=text] { width:100%; padding: 8px 10px; border: 1px solid var(--gray-3); border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 14px; background:#fff; }
#tweaks-panel .row { display:flex; gap: 8px; }
#tweaks-panel .swatches { display:flex; gap: 6px; margin-top: 4px; }
#tweaks-panel .swatch { flex:1; height: 32px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
#tweaks-panel .swatch.active { border-color: var(--ink); }

/* density */
body[data-density="compact"] .wrap { padding: 0 64px; }
body[data-density="compact"] section { padding-block: 48px !important; }

/* ——— Responsive rules ——— */
@media (max-width: 1100px) {
  .h1 { font-size: 56px; }
  .h2 { font-size: 36px; line-height: 1.1; }
  .h3 { font-size: 28px; line-height: 1.2; }
  .big-number { font-size: 96px; }
  .big-number sup { font-size: 42px; }
  /* kill hard-coded padding: 0 100px inline styles using attribute selector won't work,
     so we rely on the wrap class now using clamp(). Also force inline wraps via JS-added inline style overrides via this: */
  [data-responsive-wrap] { padding-left: clamp(20px, 5vw, 100px) !important; padding-right: clamp(20px, 5vw, 100px) !important; }
  .col-stack-sm { grid-template-columns: 1fr !important; gap: 32px !important; }
}
@media (max-width: 1020px) {
  .h1 { font-size: 42px; }
  .h2 { font-size: 30px; }
  .big-number { font-size: 72px; }
  .nav-desktop { display: none !important; }
}
@media (max-width: 820px) {
  .hero-frame { inset: 24px !important; padding: 32px 20px !important; }
  .hero-h1 { font-size: 32px !important; }
  .route-grid { grid-template-columns: 1fr !important; }
  .route-grid .route-card { order: 2; }
  .route-grid .route-center { order: 1; }
  .tag-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .quote-grid { grid-template-columns: 1fr !important; }
  .quote-grid > div:first-child, .quote-grid > div:last-child { display: none; }
}

/* dark sage theme */
body[data-scheme="forest"] { --bg: #F2EEE4; --gold: #B7982E; }
body[data-scheme="plum"] { --bg: #F3EEF0; }

/* scroll reveal baseline */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
