/* The Olive Letter — shared design tokens and components for the-scott-wedding.co.uk */
:root {
  --ivory: #F4EFE3;
  --panel: #FBF8F1;
  --cream: #EFE6D2;
  --cream-line: #C9C0A8;
  --olive: #5B6236;
  --olive-deep: #4C5230;
  --olive-light: #C9CCB8;
  --ink: #3F4526;
  --muted: #5F634F;
  --muted-2: #6B6E5E;
  --burgundy: #6E1E2B;
  --burgundy-deep: #4E1420;
  --burgundy-tint: #E9C9CE;
  --silver: #B7BBBD;
  --silver-light: #DFE2E3;
  --silver-pale: #E9EBEC;
  --white: #FFFFFF;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Pinyon Script', cursive;
  --sans: 'Jost', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-weight: 400; line-height: 1.5; }
a { color: var(--ink); } a:hover { color: var(--burgundy); }
img, video { max-width: 100%; display: block; }
button { font: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.05; }
p { margin: 0; }
.script { font-family: var(--script); font-weight: 400; }
.serif { font-family: var(--serif); }
.smallcaps { font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; }
.sc-lg { font-family: var(--serif); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.label { font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-2); }
.muted { color: var(--muted); } .muted-2 { color: var(--muted-2); } .burgundy { color: var(--burgundy); }
.light { font-weight: 300; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; font: inherit; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-burgundy { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); } .btn-burgundy:hover { background: var(--burgundy-deep); color: var(--ivory); }
.btn-olive { background: var(--olive); color: var(--ivory); border-color: var(--olive); } .btn-olive:hover { background: var(--ink); color: var(--ivory); }
.btn-ink { background: var(--ink); color: var(--panel); border-color: var(--ink); } .btn-ink:hover { background: var(--olive); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--silver); } .btn-ghost:hover { background: var(--ivory); color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--silver); } .btn-line:hover { background: var(--panel); color: var(--burgundy); }
.btn-ivory { background: var(--ivory); color: var(--burgundy); border-color: var(--ivory); } .btn-ivory:hover { background: var(--panel); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 12px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--burgundy); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* cards & fields */
.card { background: var(--panel); border: 1px solid var(--silver); border-radius: 18px; box-shadow: 0 1px 0 var(--silver-light) inset, 0 10px 30px rgba(63,69,38,.06); }
.card-flat { background: var(--panel); border: 1px solid var(--silver); border-radius: 14px; }
.frame { position: relative; }
.frame:before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--silver); border-radius: 12px; pointer-events: none; }
.field { width: 100%; min-height: 54px; padding: 12px 16px; border: 1px solid var(--silver); border-radius: 14px; background: var(--white); font: inherit; font-size: 16px; color: var(--ink); resize: none; }
.field::placeholder { color: #8E9396; }
.field:focus { outline: 0; border-color: var(--burgundy); box-shadow: 0 0 0 4px rgba(110,30,43,.14); }
.field.code { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: .18em; text-transform: uppercase; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--silver); background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pill.on { background: var(--ink); color: var(--panel); }
.pill.no.on { background: var(--burgundy); color: var(--ivory); border-color: var(--burgundy); }
.chip { min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--silver); background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--silver-light); }
.tab { border-radius: 12px; min-height: 44px; padding: 0 16px; border: 1px solid var(--silver); background: transparent; color: var(--ink); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.tab.on { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.toggle { width: 52px; height: 32px; border-radius: 999px; border: 0; padding: 3px; background: var(--olive-light); cursor: pointer; display: flex; align-items: center; transition: background .25s; flex: none; }
.toggle.on { background: var(--burgundy); }
.toggle .knob { width: 26px; height: 26px; border-radius: 50%; background: var(--panel); transition: transform .25s; }
.toggle.on .knob { transform: translateX(20px); }
.tagpill { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.error { color: var(--burgundy); font-size: 14px; }
.notice { padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--ivory); font-size: 13px; display: flex; align-items: center; gap: 10px; }

/* lace & silver */
.silver-line { background: linear-gradient(90deg, #9EA3A6, #DFE2E3, #B7BBBD, #E9EBEC, #9EA3A6); background-size: 200% 100%; animation: shimmer 6s linear infinite; }
.lace-top { height: 16px; background: radial-gradient(circle at 9px 16px, var(--ivory) 8px, transparent 9px) 0 0/18px 16px repeat-x; }
.lace-bottom { height: 16px; background: radial-gradient(circle at 9px 0, var(--ivory) 8px, transparent 9px) 0 0/18px 16px repeat-x; }
.lace-olive { height: 14px; background: radial-gradient(circle at 8px 14px, var(--olive) 7px, transparent 8px) 0 0/16px 14px repeat-x; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .4; } }
@keyframes slidein { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rec { 0%, 100% { box-shadow: 0 0 0 0 rgba(110,30,43,.5); } 70% { box-shadow: 0 0 0 22px rgba(110,30,43,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; } .d4 { animation-delay: .4s; }
.seal-breathe { transform-origin: 50% 50%; animation: breathe 5s ease-in-out infinite; }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--burgundy); animation: pulse 1.6s ease-in-out infinite; }
.pop { animation: pop .6s cubic-bezier(.2,.8,.2,1) both; }
.new { animation: slidein .5s cubic-bezier(.2,.8,.2,1) both; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--silver); border-top-color: var(--burgundy); animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* app (phone-first) layout */
.app-bg { min-height: 100vh; min-height: 100dvh; background: var(--ivory); }
@media (min-width: 640px) { .app-bg { background: var(--olive); padding: 32px 16px; } }
.app-frame { position: relative; max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--ivory); display: flex; flex-direction: column; }
@media (min-width: 640px) { .app-frame { min-height: calc(100dvh - 64px); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.25); border: 1px solid var(--silver); } }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 20px 14px; gap: 10px; }
.topbar .title { font-family: var(--serif); font-weight: 500; font-size: 27px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--silver); background: var(--panel); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; text-decoration: none; flex: none; }
.content { flex: 1 1 auto; padding: 8px 20px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.sticky-bottom { position: sticky; bottom: 0; padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(244,239,227,0), var(--ivory) 35%); }
.navgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mod { text-decoration: none; color: var(--ink); border: 1px solid var(--silver); background: var(--panel); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.mod strong { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.1; }
.mod span { font-size: 12px; color: var(--muted-2); }
.mod:hover { border-color: var(--burgundy); }
.tile { border-radius: 10px; background: #E6E2D6; border: 1px solid var(--silver); overflow: hidden; position: relative; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(63,69,38,.5); display: flex; flex-direction: column; justify-content: flex-end; z-index: 20; }
.sheet { background: var(--ivory); border-top: 1px solid var(--silver); padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; animation: sheet .45s cubic-bezier(.2,.8,.2,1) both; max-width: 520px; width: 100%; margin: 0 auto; border-radius: 24px 24px 0 0; }
.opt { border-radius: 12px; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; border: 1px solid var(--silver); background: var(--panel); font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; text-align: left; width: 100%; }
.opt:hover { background: var(--silver-light); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 1px solid var(--silver); display: flex; flex-direction: column; gap: 10px; margin-left: 8px; }
.timeline li { position: relative; }
.timeline .dot { position: absolute; left: -31px; top: 18px; width: 13px; height: 13px; border-radius: 50%; background: var(--ivory); border: 2px solid var(--ink); }
.timeline .dot.done { background: var(--ink); }
.timeline .dot.now { background: var(--burgundy); border-color: var(--burgundy); animation: pulse 1.8s ease-in-out infinite; }
.monogram { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.seal-badge { width: 110px; height: 110px; border-radius: 50%; background: var(--burgundy); border: 1px solid var(--silver); display: flex; align-items: center; justify-content: center; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.hr { height: 1px; background: var(--silver-light); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
